Class FTPTaskMirrorImpl.FTPDirectoryScanner

  extended by
      extended by
All Implemented Interfaces:
FileScanner, ResourceFactory, SelectorScanner
Enclosing class:

protected class FTPTaskMirrorImpl.FTPDirectoryScanner
extends DirectoryScanner

internal class allowing to read the contents of a remote file system using the FTP protocol used in particular for ftp get operations differences with DirectoryScanner "" (the root of the fileset) is never included in the included directories followSymlinks defaults to false

Nested Class Summary
protected  class FTPTaskMirrorImpl.FTPDirectoryScanner.AntFTPFile
          an AntFTPFile is a representation of a remote file
protected  class FTPTaskMirrorImpl.FTPDirectoryScanner.AntFTPRootFile
          special class to represent the remote directory itself
Field Summary
protected ftp
Fields inherited from class
basedir, DEFAULTEXCLUDES, dirsDeselected, dirsExcluded, dirsIncluded, dirsNotIncluded, DOES_NOT_EXIST_POSTFIX, errorOnMissingDir, everythingIncluded, excludes, filesDeselected, filesExcluded, filesIncluded, filesNotIncluded, haveSlowResults, includes, isCaseSensitive, MAX_LEVELS_OF_SYMLINKS, selectors
Constructor Summary
FTPTaskMirrorImpl.FTPDirectoryScanner( ftp)
Method Summary[] listFiles(java.lang.String directory)
          cd into one directory and list the files present in one directory.[] listFiles(java.lang.String directory, boolean changedir)
          list the files present in one directory.
 void scan()
          scans the remote directory, storing internally the included files, directories, ...
protected  void scandir(java.lang.String dir, java.lang.String vpath, boolean fast)
          scans a particular directory.
Methods inherited from class
addDefaultExclude, addDefaultExcludes, addExcludes, clearResults, couldHoldIncluded, getBasedir, getDefaultExcludes, getDeselectedDirectories, getDeselectedFiles, getExcludedDirectories, getExcludedFiles, getIncludedDirectories, getIncludedDirsCount, getIncludedFiles, getIncludedFilesCount, getNotFollowedSymlinks, getNotIncludedDirectories, getNotIncludedFiles, getResource, isCaseSensitive, isEverythingIncluded, isExcluded, isFollowSymlinks, isIncluded, isSelected, match, match, matchPath, matchPath, matchPatternStart, matchPatternStart, removeDefaultExclude, resetDefaultExcludes, scandir, setBasedir, setBasedir, setCaseSensitive, setErrorOnMissingDir, setExcludes, setFollowSymlinks, setIncludes, setMaxLevelsOfSymlinks, setSelectors, slowScan
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected ftp
Constructor Detail


public FTPTaskMirrorImpl.FTPDirectoryScanner( ftp)

ftp - ftpclient object
Method Detail


public void scan()
scans the remote directory, storing internally the included files, directories, ...

Specified by:
scan in interface FileScanner
scan in class DirectoryScanner


protected void scandir(java.lang.String dir,
                       java.lang.String vpath,
                       boolean fast)
scans a particular directory. populates the scannedDirs cache.

dir - directory to scan
vpath - relative path to the base directory of the remote fileset always ended with a File.separator
fast - seems to be always true in practice


public[] listFiles(java.lang.String directory,
                                                      boolean changedir)
list the files present in one directory.

directory - full path on the remote side
changedir - if true change to directory directory before listing
array of FTPFile


public[] listFiles(java.lang.String directory)
cd into one directory and list the files present in one directory.

directory - full path on the remote side
array of FTPFile