public class SftpDirectoryStream extends Object implements SftpClientHolder, DirectoryStream<Path>
DirectoryStreamDirectoryStream.Filter<T>| Modifier and Type | Field and Description |
|---|---|
protected SftpPathIterator |
pathIterator |
| Constructor and Description |
|---|
SftpDirectoryStream(SftpPath path) |
SftpDirectoryStream(SftpPath path,
DirectoryStream.Filter<? super Path> filter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
SftpClient |
getClient() |
DirectoryStream.Filter<? super Path> |
getFilter() |
SftpPath |
getRootPath() |
Iterator<Path> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected SftpPathIterator pathIterator
public SftpDirectoryStream(SftpPath path) throws IOException
path - The remote SftpPathIOException - If failed to initialize the directory access handlepublic SftpDirectoryStream(SftpPath path, DirectoryStream.Filter<? super Path> filter) throws IOException
path - The remote SftpPathfilter - An optional filter - ignored if
nullIOException - If failed to initialize the directory access handlepublic final SftpClient getClient()
getClient in interface SftpClientHolderpublic final SftpPath getRootPath()
SftpPath for this directory streampublic final DirectoryStream.Filter<? super Path> getFilter()
null to indicate no filterpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2018–2021 The Apache Software Foundation. All rights reserved.