Class SftpUtils
java.lang.Object
org.apache.sshd.sftp.client.fs.impl.SftpUtils
Internal utilities for SFTP file systems.
- Author:
- Apache MINA SSHD Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ThreadLocal<Boolean> 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). -
Method Summary
-
Field Details
-
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();
-