Class SftpUtils
- java.lang.Object
-
- org.apache.sshd.sftp.client.fs.impl.SftpUtils
-
public final class SftpUtils extends java.lang.ObjectInternal utilities for SFTP file systems.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ThreadLocal<java.lang.Boolean>DIRECTORY_WITH_DOTSFor internal uses, this can be set to Boolean.TRUE to indicate that a SftpDirectoryStream created shall report the "." and ".." entries (which Java normally doesn't do, but which we do get from the SFTP server).
-
Constructor Summary
Constructors Modifier Constructor Description privateSftpUtils()
-
-
-
Field Detail
-
DIRECTORY_WITH_DOTS
public static final java.lang.ThreadLocal<java.lang.Boolean> DIRECTORY_WITH_DOTS
For internal uses, this can be set to Boolean.TRUE to indicate that a SftpDirectoryStream created shall report the "." and ".." entries (which Java normally doesn't do, but which we do get from the SFTP server). The stream, if it recognizes this, will set the value tonull, so code using this can check after having created the stream whether it will return these entries (value isnull). Intended usage:SftpUtils.DIRECTORY_WITH_DOTS.set(Boolean.TRUE); DirectoryStream<Path> dir = Files.newDirectoryStream(somePath); boolean withDots = SftpUtils.DIRECTORY_WITH_DOTS.get() == null; SftpUtil.DIRECTORY_WITH_DOTS.remove();
-
-