Package org.apache.sshd.sftp.client.fs
Class SftpFileSystem
- java.lang.Object
-
- java.nio.file.FileSystem
-
- org.apache.sshd.common.file.util.BaseFileSystem<SftpPath>
-
- org.apache.sshd.sftp.client.fs.SftpFileSystem
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ClientSessionHolder,SessionContextHolder,SessionHolder<ClientSession>
public class SftpFileSystem extends BaseFileSystem<SftpPath> implements SessionHolder<ClientSession>, ClientSessionHolder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSftpFileSystem.DefaultGroupPrincipalstatic classSftpFileSystem.DefaultUserPrincipalstatic classSftpFileSystem.DefaultUserPrincipalLookupService
-
Field Summary
Fields Modifier and Type Field Description static NavigableSet<String>UNIVERSAL_SUPPORTED_VIEWS-
Fields inherited from class org.apache.sshd.common.file.util.BaseFileSystem
log
-
-
Constructor Summary
Constructors Constructor Description SftpFileSystem(SftpFileSystemProvider provider, String id, ClientSession session, SftpClientFactory factory, SftpVersionSelector selector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected SftpPathcreate(String root, List<String> names)SftpClientgetClient()ClientSessiongetClientSession()SftpPathgetDefaultDir()List<FileStore>getFileStores()StringgetId()intgetReadBufferSize()ClientSessiongetSession()SftpVersionSelectorgetSftpVersionSelector()UserPrincipalLookupServicegetUserPrincipalLookupService()intgetVersion()intgetWriteBufferSize()booleanisOpen()SftpFileSystemProviderprovider()voidsetReadBufferSize(int size)voidsetWriteBufferSize(int size)Set<String>supportedFileAttributeViews()StringtoString()-
Methods inherited from class org.apache.sshd.common.file.util.BaseFileSystem
appendDedupSep, create, create, getPath, getPathMatcher, getRootDirectories, getSeparator, globToRegex, isReadOnly, newWatchService
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
-
-
-
Field Detail
-
UNIVERSAL_SUPPORTED_VIEWS
public static final NavigableSet<String> UNIVERSAL_SUPPORTED_VIEWS
-
-
Constructor Detail
-
SftpFileSystem
public SftpFileSystem(SftpFileSystemProvider provider, String id, ClientSession session, SftpClientFactory factory, SftpVersionSelector selector) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getSftpVersionSelector
public final SftpVersionSelector getSftpVersionSelector()
-
getId
public final String getId()
-
getVersion
public final int getVersion()
-
provider
public SftpFileSystemProvider provider()
- Overrides:
providerin classBaseFileSystem<SftpPath>
-
getFileStores
public List<FileStore> getFileStores()
- Overrides:
getFileStoresin classBaseFileSystem<SftpPath>
-
getReadBufferSize
public int getReadBufferSize()
-
setReadBufferSize
public void setReadBufferSize(int size)
-
getWriteBufferSize
public int getWriteBufferSize()
-
setWriteBufferSize
public void setWriteBufferSize(int size)
-
create
protected SftpPath create(String root, List<String> names)
- Specified by:
createin classBaseFileSystem<SftpPath>
-
getClientSession
public ClientSession getClientSession()
- Specified by:
getClientSessionin interfaceClientSessionHolder- Returns:
- The underlying
ClientSessionused
-
getSession
public ClientSession getSession()
- Specified by:
getSessionin interfaceSessionHolder<ClientSession>
-
getClient
public SftpClient getClient() throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classFileSystem- Throws:
IOException
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin classFileSystem
-
supportedFileAttributeViews
public Set<String> supportedFileAttributeViews()
- Specified by:
supportedFileAttributeViewsin classFileSystem
-
getUserPrincipalLookupService
public UserPrincipalLookupService getUserPrincipalLookupService()
- Specified by:
getUserPrincipalLookupServicein classFileSystem
-
getDefaultDir
public SftpPath getDefaultDir()
- Overrides:
getDefaultDirin classBaseFileSystem<SftpPath>
-
-