Class SftpDirectoryStream
- java.lang.Object
-
- org.apache.sshd.client.subsystem.sftp.fs.SftpDirectoryStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Iterable<java.nio.file.Path>
,java.nio.file.DirectoryStream<java.nio.file.Path>
public class SftpDirectoryStream extends java.lang.Object implements java.nio.file.DirectoryStream<java.nio.file.Path>
Implements a remoteDirectoryStream
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Iterable<SftpClient.DirEntry>
iter
private SftpPath
p
private SftpClient
sftp
-
Constructor Summary
Constructors Constructor Description SftpDirectoryStream(SftpPath path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
SftpClient
getClient()
Client instance used to access the remote directoryjava.util.Iterator<java.nio.file.Path>
iterator()
-
-
-
Field Detail
-
sftp
private final SftpClient sftp
-
iter
private final java.lang.Iterable<SftpClient.DirEntry> iter
-
p
private final SftpPath p
-
-
Method Detail
-
getClient
public final SftpClient getClient()
Client instance used to access the remote directory- Returns:
- The
SftpClient
instance used to access the remote directory
-
iterator
public java.util.Iterator<java.nio.file.Path> iterator()
- Specified by:
iterator
in interfacejava.nio.file.DirectoryStream<java.nio.file.Path>
- Specified by:
iterator
in interfacejava.lang.Iterable<java.nio.file.Path>
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-