Class FTPTaskMirrorImpl.FTPFileProxy
java.lang.Object
java.io.File
org.apache.tools.ant.taskdefs.optional.net.FTPTaskMirrorImpl.FTPFileProxy
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<java.io.File>
- Enclosing class:
- FTPTaskMirrorImpl
protected static class FTPTaskMirrorImpl.FTPFileProxy
extends java.io.File
internal class providing a File-like interface to some of the information
available from the FTP server
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FTPFileProxy(java.lang.String completePath)creates a proxy to a FTP directoryFTPFileProxy(org.apache.commons.net.ftp.FTPFile file)creates a proxy to a FTP file -
Method Summary
Modifier and Type Method Description booleanexists()java.lang.StringgetAbsolutePath()java.lang.StringgetName()java.lang.StringgetParent()java.lang.StringgetPath()booleanisAbsolute()FTP files are stored as absolute pathsbooleanisDirectory()booleanisFile()booleanisHidden()FTP files cannot be hiddenlonglastModified()longlength()Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, getAbsoluteFile, getCanonicalFile, getCanonicalPath, getFreeSpace, getParentFile, getTotalSpace, getUsableSpace, hashCode, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
-
Constructor Details
-
FTPFileProxy
public FTPFileProxy(org.apache.commons.net.ftp.FTPFile file)creates a proxy to a FTP file- Parameters:
file- FTPFile
-
FTPFileProxy
public FTPFileProxy(java.lang.String completePath)creates a proxy to a FTP directory- Parameters:
completePath- the remote directory.
-
-
Method Details
-
exists
public boolean exists()- Overrides:
existsin classjava.io.File
-
getAbsolutePath
public java.lang.String getAbsolutePath()- Overrides:
getAbsolutePathin classjava.io.File
-
getName
public java.lang.String getName()- Overrides:
getNamein classjava.io.File
-
getParent
public java.lang.String getParent()- Overrides:
getParentin classjava.io.File
-
getPath
public java.lang.String getPath()- Overrides:
getPathin classjava.io.File
-
isAbsolute
public boolean isAbsolute()FTP files are stored as absolute paths- Overrides:
isAbsolutein classjava.io.File- Returns:
- true
-
isDirectory
public boolean isDirectory()- Overrides:
isDirectoryin classjava.io.File
-
isFile
public boolean isFile()- Overrides:
isFilein classjava.io.File
-
isHidden
public boolean isHidden()FTP files cannot be hidden- Overrides:
isHiddenin classjava.io.File- Returns:
- false
-
lastModified
public long lastModified()- Overrides:
lastModifiedin classjava.io.File
-
length
public long length()- Overrides:
lengthin classjava.io.File
-