org.apache.tools.ant.taskdefs.optional.net
protected class FTPTaskMirrorImpl.FTPDirectoryScanner.AntFTPFile extends Object
Since: Ant 1.6
Constructor Summary | |
---|---|
AntFTPFile(FTPClient client, FTPFile ftpFile, String curpwd)
constructor | |
AntFTPFile(FTPTaskMirrorImpl.FTPDirectoryScanner.AntFTPFile parent, String path)
other constructor |
Method Summary | |
---|---|
boolean | exists()
find out if the file exists |
String | getAbsolutePath()
find out the absolute path of the file |
protected FTPClient | getClient()
return the attached FTP client object.
|
String | getCurpwd()
returns the path of the directory containing the AntFTPFile.
of the full path of the file itself in case of AntFTPRootFile |
String | getFastRelativePath()
find out the relative path assuming that the path used to construct
this AntFTPFile was spelled properly with regards to case.
|
FTPFile | getFile(FTPFile[] theFiles, String lastpathelement)
find a file matching a string in an array of FTPFile.
|
String | getLink()
if the file is a symbolic link, find out to what it is pointing |
String | getName()
get the name of the file |
String | getRelativePath()
find out the relative path to the rootPath of the enclosing scanner.
this relative path is spelled exactly like on disk,
for instance if the AntFTPFile has been instantiated as ALPHA,
but the file is really called alpha, this method will return alpha.
|
boolean | isDirectory()
tell if a file is a directory.
note that it will return false for symbolic links pointing to directories. |
boolean | isSymbolicLink()
tell if a file is a symbolic link |
boolean | isTraverseSymlinks()
find out if a symbolic link is encountered in the relative path of this file
from rootPath. |
protected void | setCurpwd(String curpwd)
sets the current path of an AntFTPFile |
String | toString()
Get a string rep of this object. |
Parameters: client ftp client variable ftpFile the file curpwd absolute remote path where the file is found
Parameters: parent the parent file path a relative path to the parent file
Returns: true if the file exists
Returns: absolute path as string
Returns: FTP client
Returns: parent directory of the AntFTPFile
Returns: relative path
Parameters: theFiles array of files lastpathelement the file name being sought
Returns: null if the file cannot be found, otherwise return the matching file.
Returns: the target of the symbolic link
Returns: the name of the file
Returns: relative path, separated by remoteFileSep
Throws: IOException if a change directory fails, ... BuildException if one of the components of the relative path cannot be found.
Returns: true
for directories
Returns: true
for symbolic links
Returns: true
if a symbolic link is encountered in the relative path.
Throws: IOException if one of the change directory or directory listing operations fails BuildException if a path component in the relative path cannot be found.
Parameters: curpwd the current path one wants to set
Returns: a string containing the pwd and the file.