Package org.apache.sshd.sftp.client.fs
Class SftpDirectoryStream
java.lang.Object
org.apache.sshd.sftp.client.fs.SftpDirectoryStream
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<Path>,DirectoryStream<Path>,SftpClientHolder
Implements a remote
DirectoryStream-
Nested Class Summary
Nested classes/interfaces inherited from interface java.nio.file.DirectoryStream
DirectoryStream.Filter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DirectoryStream.Filter<? super Path> private final SftpPathprotected SftpPathIteratorprotected booleanprivate final SftpClient -
Constructor Summary
ConstructorsConstructorDescriptionSftpDirectoryStream(SftpPath path) SftpDirectoryStream(SftpPath path, DirectoryStream.Filter<? super Path> filter) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final SftpClientfinal DirectoryStream.Filter<? super Path> final SftpPathiterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
pathIterator
-
pathIteratorConsumed
protected boolean pathIteratorConsumed -
path
-
filter
-
sftp
-
-
Constructor Details
-
SftpDirectoryStream
- Parameters:
path- The remoteSftpPath- Throws:
IOException- If failed to initialize the directory access handle
-
SftpDirectoryStream
public SftpDirectoryStream(SftpPath path, DirectoryStream.Filter<? super Path> filter) throws IOException - Parameters:
path- The remoteSftpPathfilter- An optionalfilter- ignored ifnull- Throws:
IOException- If failed to initialize the directory access handle
-
-
Method Details
-
getClient
- Specified by:
getClientin interfaceSftpClientHolder
-
getRootPath
- Returns:
- The root
SftpPathfor this directory stream
-
getFilter
- Returns:
- The original filter - may be
nullto indicate no filter
-
iterator
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-