Modifier and Type | Field and Description |
---|---|
private String |
access |
(package private) Ftp |
client |
private long |
date |
private String |
ext |
private static char |
FILE |
private static char |
FOLDER |
private String |
group |
private static char |
LINK |
private static String[] |
months |
private String |
name |
private String |
owner |
(package private) String |
path |
private long |
size |
private static char |
SPECIAL |
Modifier | Constructor and Description |
---|---|
private |
FtpFile() |
|
FtpFile(FtpFile dir,
String name,
Ftp client)
Creates a new FtpFile instance from a parent
abstract pathname and a child pathname string.
|
|
FtpFile(String path,
Ftp client)
Creates a new FtpFile instance by converting the
given pathname string into an abstract pathname.
|
|
FtpFile(String path,
String name,
Ftp client)
Creates a new FtpFile instance from a parent
pathname string and a child pathname string.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
Tests whether the application can read the file denoted
by this abstract pathname.
|
boolean |
canWrite()
Tests whether the application can modify to the file
denoted by this abstract pathname.
|
int |
compareExtToIgnoreCase(CoOrder file)
Compares two abstract pathnames lexicographically by extension.
|
int |
compareNameToIgnoreCase(CoOrder file)
Compares two abstract pathnames lexicographically by name.
|
int |
compareTo(Object o)
Compares two abstract pathnames lexicographically (by pathname).
|
boolean |
delete()
Deletes the file or directory denoted by this abstract pathname.
|
boolean |
equals(Object o) |
boolean |
equalsExtTo(String filter)
Tests this abstract pathname for equality with the given extension.
|
boolean |
equalsExtTo(String[] filter)
Tests this abstract pathname for equality with one of the given extensions.
|
private static FtpFile |
examineListLine(FtpFile path,
String line) |
private static FtpFile |
examineNameListLine(FtpFile path,
String line,
int listtype) |
private static long |
examineUnixListDate(String month,
String day,
String year2time) |
private static FtpFile |
examineUnixListLine(FtpFile path,
String line) |
private static long |
examineWinListDate(String date,
String time) |
private static FtpFile |
examineWinListLine(FtpFile path,
String line) |
boolean |
exists()
Tests whether the file denoted by this abstract pathname exists.
|
String |
getAbsolutePath()
Returns the absolute pathname of the file represented
by this object.
|
String |
getAccess()
Returns access string.
|
CoConsole |
getConsole()
Gets console if implemented or null.
|
char |
getDataType()
Get type of data transfer.
|
String |
getGroup()
Get group of users for this file object.
|
String |
getHost()
Returns the host name.
|
InputStream |
getInputStream()
Returns an input stream for this file.
|
String |
getName()
Returns the name of the file represented by this object.
|
OutputStream |
getOutputStream()
Returns an output stream for this file.
|
OutputStream |
getOutputStream(boolean append)
Returns an output stream for this file.
|
String |
getOwner()
Get owner of this file object.
|
String |
getParent()
Returns the parent part of the pathname of this File
object, or null if the name has no parent part.
|
String[] |
getPathArray()
Tokens the pathname by separator.
|
int |
getPathDepth()
Returns depth (number of levels) of this abstract pathname.
|
CoFile |
getPathFragment(int depth)
Returns abstract pathname containing first depth
levels of this pathname of the file represented by this object.
|
boolean |
isAbsolute()
Tests if the file represented by this File object
is an absolute pathname.
|
boolean |
isConnected()
Tests if corresponding connection to remote host is active.
|
boolean |
isDirectory()
Tests if the file represented by this File object
is a directory.
|
boolean |
isExecutable()
Tests if the file represented by this File object is executable.
|
boolean |
isFile()
Tests if the file represented by this File object
is a "normal" file.
|
boolean |
isHidden()
Tests whether the file named by this abstract pathname is a hidden file.
|
boolean |
isLink()
Tests whether the file named by this abstract pathname is a link.
|
boolean |
isSpecial()
Tests whether the file named by this abstract pathname is a special file.
|
long |
lastModified()
Returns the time that the file represented by this
File object was last modified.
|
String |
lastModifiedString()
Returns the time string that the file represented by this
CoFile object was last modified in short mode.
|
long |
length()
Returns the length of the file represented by this
File object.
|
CoFile[] |
listCoFiles()
Returns an array of abstract pathnames denoting the files in
the directory denoted by this abstract pathname.
|
CoFile[] |
listCoFiles(CoFilenameFilter filter)
Returns an array of strings naming the files and directories
in the directory denoted by this abstract pathname that satisfy
the specified filter.
|
CoFile[] |
listCoRoots()
List the available filesystem roots.
|
boolean |
mkdir()
Creates the directory named by this abstract pathname.
|
boolean |
mkdirs()
Creates the directory named by this abstract pathname,
including any necessary but nonexistent parent directories.
|
CoFile |
newFileChild(String child)
Creates a new file instance from this
abstract pathname and a child string.
|
CoFile |
newFileRename(String name)
Creates a new file instance from a parent
of this abstract pathname and a name string.
|
String |
propertyString()
Returns a property string.
|
boolean |
renameTo(CoFile dest)
Renames the file denoted by this abstract pathname.
|
private void |
sortSetup(String name) |
boolean |
startsWithIgnoreCase(char ch)
Tests this abstract pathname whether
name starts with the given character.
|
String |
toString()
Returns a string representation of this object.
|
private static final char LINK
private static final char SPECIAL
private static final char FOLDER
private static final char FILE
private long size
private long date
private FtpFile()
public FtpFile(String path, Ftp client)
public FtpFile(String path, String name, Ftp client)
public int compareNameToIgnoreCase(CoOrder file)
CoOrder
compareNameToIgnoreCase
in interface CoOrder
public int compareExtToIgnoreCase(CoOrder file)
CoOrder
compareExtToIgnoreCase
in interface CoOrder
public boolean startsWithIgnoreCase(char ch)
CoOrder
startsWithIgnoreCase
in interface CoOrder
public boolean equalsExtTo(String filter)
CoOrder
equalsExtTo
in interface CoOrder
public boolean equalsExtTo(String[] filter)
CoOrder
equalsExtTo
in interface CoOrder
public int compareTo(Object o)
CoOrder
compareTo
in interface CoOrder
compareTo
in interface Comparable
public boolean isConnected()
CoOrder
isConnected
in interface CoOrder
public char getDataType()
CoOpen
getDataType
in interface CoOpen
public InputStream getInputStream() throws IOException
CoOpen
getInputStream
in interface CoOpen
IOException
public OutputStream getOutputStream() throws IOException
CoOpen
getOutputStream
in interface CoOpen
IOException
public OutputStream getOutputStream(boolean append) throws IOException
CoOpen
getOutputStream
in interface CoOpen
IOException
public CoFile newFileChild(String child)
CoOpen
newFileChild
in interface CoOpen
public CoFile newFileRename(String name)
CoOpen
newFileRename
in interface CoOpen
public CoConsole getConsole()
CoOpen
getConsole
in interface CoOpen
public String getHost()
CoFile
public String getAbsolutePath()
CoFile
getAbsolutePath
in interface CoFile
public int getPathDepth()
CoFile
getPathDepth
in interface CoFile
public CoFile getPathFragment(int depth)
CoFile
getPathFragment
in interface CoFile
public String[] getPathArray()
CoFile
getPathArray
in interface CoFile
[Server-name]/[Disk-root]
[1st-level-parent-dir-name]
[2nd-level-parent-dir-name]
...
[Top-level-parent-dir-name]
public String getName()
CoFile
public String getParent()
CoFile
public boolean delete() throws SecurityException
CoFile
delete
in interface CoFile
SecurityException
public boolean mkdir() throws SecurityException
CoFile
mkdir
in interface CoFile
SecurityException
public boolean mkdirs() throws SecurityException
CoFile
mkdirs
in interface CoFile
SecurityException
public boolean renameTo(CoFile dest) throws SecurityException
CoFile
renameTo
in interface CoFile
SecurityException
public long length()
CoFile
public long lastModified()
CoFile
lastModified
in interface CoFile
public String lastModifiedString()
CoFile
lastModifiedString
in interface CoFile
public boolean isAbsolute()
CoFile
isAbsolute
in interface CoFile
public boolean isDirectory()
CoFile
isDirectory
in interface CoFile
public boolean isFile()
CoFile
public boolean isSpecial()
CoFile
public boolean isLink()
CoFile
public boolean isExecutable()
public boolean isHidden()
CoFile
public boolean canRead()
CoFile
public boolean canWrite()
CoFile
public boolean exists()
CoFile
public String getAccess()
CoFile
public String propertyString()
CoFile
propertyString
in interface CoFile
public CoFile[] listCoRoots()
CoFile
listCoRoots
in interface CoFile
public CoFile[] listCoFiles() throws SecurityException
CoFile
listCoFiles
in interface CoFile
SecurityException
public CoFile[] listCoFiles(CoFilenameFilter filter) throws SecurityException
CoFile
CoFile.listCoFiles()
} method, except that the strings
in the returned array must satisfy the filter. If the given filter
is null then all names are accepted.listCoFiles
in interface CoFile
SecurityException
private static FtpFile examineListLine(FtpFile path, String line) throws NoSuchElementException
NoSuchElementException
private static FtpFile examineNameListLine(FtpFile path, String line, int listtype) throws NoSuchElementException
NoSuchElementException
private static FtpFile examineWinListLine(FtpFile path, String line) throws NoSuchElementException
NoSuchElementException
private static long examineWinListDate(String date, String time)
private static FtpFile examineUnixListLine(FtpFile path, String line) throws NoSuchElementException
NoSuchElementException
private static long examineUnixListDate(String month, String day, String year2time)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses