org.apache.commons.vfs2.provider.ftp
Class FtpFileSystem

java.lang.Object
  extended by org.apache.commons.vfs2.provider.AbstractVfsComponent
      extended by org.apache.commons.vfs2.provider.AbstractFileSystem
          extended by org.apache.commons.vfs2.provider.ftp.FtpFileSystem
All Implemented Interfaces:
FileSystem, VfsComponent

public class FtpFileSystem
extends AbstractFileSystem

An FTP file system.

Author:
Commons VFS team

Constructor Summary
FtpFileSystem(GenericFileName rootName, FtpClient ftpClient, FileSystemOptions fileSystemOptions)
           
 
Method Summary
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()
          Close the underlaying link used to access the files
 FtpClient getClient()
          Creates an FTP client to use.
 void putClient(FtpClient client)
          Returns an FTP client after use.
 
Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileSystem
addJunction, addListener, close, closeCommunicationLink, decorateFileObject, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, init, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttribute
 
Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent
getContext, getLogger, setContext, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FtpFileSystem

public FtpFileSystem(GenericFileName rootName,
                     FtpClient ftpClient,
                     FileSystemOptions fileSystemOptions)
Parameters:
rootName - The root of the file system.
ftpClient - The FtpClient.
fileSystemOptions - The FileSystemOptions.
Since:
2.0 (was protected)
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

addCapabilities

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

Specified by:
addCapabilities in class AbstractFileSystem

getClient

public FtpClient getClient()
                    throws FileSystemException
Creates an FTP client to use.

Returns:
An FTPCleint.
Throws:
FileSystemException - if an error occurs.

putClient

public void putClient(FtpClient client)
Returns an FTP client after use.

Parameters:
client - The FTPClient.

createFile

protected FileObject createFile(AbstractFileName name)
                         throws FileSystemException
Creates a file object.

Specified by:
createFile in class AbstractFileSystem
Throws:
FileSystemException


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