public class SftpFileSystem extends AbstractFileSystem
Modifier | Constructor and Description |
---|---|
protected |
SftpFileSystem(GenericFileName rootName,
com.jcraft.jsch.Session session,
FileSystemOptions fileSystemOptions) |
Modifier and Type | Method and Description |
---|---|
protected void |
addCapabilities(Collection<Capability> caps)
Adds the capabilities of this file system.
|
protected FileObject |
createFile(AbstractFileName name)
Creates a file object.
|
protected void |
doCloseCommunicationLink()
Closes 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()
Gets the (numeric) group IDs.
|
boolean |
isExecDisabled() |
protected void |
putChannel(com.jcraft.jsch.ChannelSftp channelSftp)
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 addCapabilities(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
protected void doCloseCommunicationLink()
AbstractFileSystem
doCloseCommunicationLink
in class AbstractFileSystem
protected com.jcraft.jsch.ChannelSftp getChannel() throws IOException
FileSystemException
- if a session cannot be created.IOException
- if an I/O error is detected.public int[] getGroupsIds() throws com.jcraft.jsch.JSchException, IOException
com.jcraft.jsch.JSchException
- If a problem occurs while retrieving the group IDs.IOException
- if an I/O error is detected.public double getLastModTimeAccuracy()
getLastModTimeAccuracy
in interface FileSystem
getLastModTimeAccuracy
in class AbstractFileSystem
public int getUId() throws com.jcraft.jsch.JSchException, IOException
com.jcraft.jsch.JSchException
- If a problem occurs while retrieving the group ID.IOException
- if an I/O error is detected.public boolean isExecDisabled()
execDisabled
protected void putChannel(com.jcraft.jsch.ChannelSftp channelSftp)
channelSftp
- the SFTP channel.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.