FileSystem
, VfsComponent
public class SftpFileSystem extends AbstractFileSystem
Modifier | Constructor | Description |
---|---|---|
protected |
SftpFileSystem(GenericFileName rootName,
com.jcraft.jsch.Session session,
FileSystemOptions fileSystemOptions) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
addCapabilities(java.util.Collection<Capability> caps) |
Adds the capabilities of this file system.
|
protected FileObject |
createFile(AbstractFileName name) |
Creates a file object.
|
protected void |
doCloseCommunicationLink() |
Close the underlying link used to access the files
|
protected com.jcraft.jsch.ChannelSftp |
getChannel() |
Returns an SFTP channel to the server.
|
int[] |
getGroupsIds() |
Gets the (numeric) group IDs.
|
double |
getLastModTimeAccuracy() |
Last modification time is only an int and in seconds, thus can be off by 999.
|
int |
getUId() |
Get the (numeric) group IDs.
|
protected void |
putChannel(com.jcraft.jsch.ChannelSftp channel) |
Returns a channel to the pool.
|
addJunction, addListener, close, closeCommunicationLink, decorateFileObject, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, init, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttribute
getContext, getLogger, setContext, setLogger
protected SftpFileSystem(GenericFileName rootName, com.jcraft.jsch.Session session, FileSystemOptions fileSystemOptions)
protected void doCloseCommunicationLink()
AbstractFileSystem
doCloseCommunicationLink
in class AbstractFileSystem
protected com.jcraft.jsch.ChannelSftp getChannel() throws java.io.IOException
FileSystemException
- if a session cannot be created.java.io.IOException
- if an I/O error is detected.protected void putChannel(com.jcraft.jsch.ChannelSftp channel)
channel
- the used channel.protected void addCapabilities(java.util.Collection<Capability> caps)
addCapabilities
in class AbstractFileSystem
caps
- collections of Capabilities, can be immutable.protected FileObject createFile(AbstractFileName name) throws FileSystemException
createFile
in class AbstractFileSystem
name
- name referencing the new file.FileSystemException
public double getLastModTimeAccuracy()
getLastModTimeAccuracy
in interface FileSystem
getLastModTimeAccuracy
in class AbstractFileSystem
public int[] getGroupsIds() throws com.jcraft.jsch.JSchException, java.io.IOException
com.jcraft.jsch.JSchException
- If a problem occurs while retrieving the group IDs.java.io.IOException
- if an I/O error is detected.public int getUId() throws com.jcraft.jsch.JSchException, java.io.IOException
com.jcraft.jsch.JSchException
- If a problem occurs while retrieving the group ID.java.io.IOException
- if an I/O error is detected.