public class SftpDirectoryStream extends Object implements SftpClientHolder, DirectoryStream<Path>
DirectoryStream
DirectoryStream.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, wait
forEach, spliterator
protected SftpPathIterator pathIterator
public SftpDirectoryStream(SftpPath path) throws IOException
path
- The remote SftpPath
IOException
- If failed to initialize the directory access handlepublic SftpDirectoryStream(SftpPath path, DirectoryStream.Filter<? super Path> filter) throws IOException
path
- The remote SftpPath
filter
- An optional filter
- ignored if
null
IOException
- If failed to initialize the directory access handlepublic final SftpClient getClient()
getClient
in interface SftpClientHolder
public 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 Closeable
close
in interface AutoCloseable
IOException
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.