org.apache.commons.vfs.provider.sftp
Class SftpFileSystem

java.lang.Object
  extended byorg.apache.commons.vfs.provider.AbstractVfsComponent
      extended byorg.apache.commons.vfs.provider.AbstractFileSystem
          extended byorg.apache.commons.vfs.provider.sftp.SftpFileSystem
All Implemented Interfaces:
FileSystem, VfsComponent

public class SftpFileSystem
extends AbstractFileSystem
implements FileSystem

Represents the files on an SFTP server.

Version:
$Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $
Author:
Adam Murdoch

Constructor Summary
protected SftpFileSystem(GenericFileName rootName, com.jcraft.jsch.Session session, FileSystemOptions fileSystemOptions)
           
 
Method Summary
protected  void addCapabilities(Collection caps)
          Adds the capabilities of this file system.
protected  FileObject createFile(FileName name)
          Creates a file object.
protected  void doCloseCommunicationLink()
          Close the underlaying link used to access the files
protected  com.jcraft.jsch.ChannelSftp getChannel()
          Returns an SFTP channel to the server.
 double getLastModTimeAccuracy()
          last mod time is only a int and in seconds, thus can be off by 999
protected  void putChannel(com.jcraft.jsch.ChannelSftp channel)
          Returns a channel to the pool.
 
Methods inherited from class org.apache.commons.vfs.provider.AbstractFileSystem
addJunction, addListener, close, closeCommunicationLink, decorateFileObject, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getParentLayer, getRoot, getRootName, hasCapability, init, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttribute
 
Methods inherited from class org.apache.commons.vfs.provider.AbstractVfsComponent
getContext, getLogger, setContext, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.vfs.FileSystem
addJunction, addListener, getAttribute, getFileSystemManager, getFileSystemOptions, getParentLayer, getRoot, getRootName, hasCapability, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttribute
 

Constructor Detail

SftpFileSystem

protected SftpFileSystem(GenericFileName rootName,
                         com.jcraft.jsch.Session session,
                         FileSystemOptions fileSystemOptions)
Method Detail

doCloseCommunicationLink

protected void doCloseCommunicationLink()
Description copied from class: AbstractFileSystem
Close the underlaying link used to access the files

Overrides:
doCloseCommunicationLink in class AbstractFileSystem

getChannel

protected com.jcraft.jsch.ChannelSftp getChannel()
                                          throws IOException
Returns an SFTP channel to the server.

Throws:
IOException

putChannel

protected void putChannel(com.jcraft.jsch.ChannelSftp channel)
Returns a channel to the pool.


addCapabilities

protected void addCapabilities(Collection caps)
Adds the capabilities of this file system.

Specified by:
addCapabilities in class AbstractFileSystem

createFile

protected FileObject createFile(FileName name)
                         throws FileSystemException
Creates a file object. This method is called only if the requested file is not cached.

Specified by:
createFile in class AbstractFileSystem
Throws:
FileSystemException

getLastModTimeAccuracy

public double getLastModTimeAccuracy()
last mod time is only a int and in seconds, thus can be off by 999

Specified by:
getLastModTimeAccuracy in interface FileSystem
Overrides:
getLastModTimeAccuracy in class AbstractFileSystem
Returns:
1000


Copyright © 2002-2006 The Apache Software Foundation. All Rights Reserved.