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.
|
boolean |
delete()
Deletes the file or directory denoted by this abstract pathname.
|
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.
|
String |
getHost()
Returns the host name.
|
String |
getName()
Returns the name of the file represented by this 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 |
isDirectory()
Tests if the file represented by this File object
is a directory.
|
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.
|
String |
propertyString()
Returns a property string.
|
boolean |
renameTo(CoFile dest)
Renames the file denoted by this abstract pathname.
|
String |
toString()
Returns a string representation of this object.
|
compareExtToIgnoreCase, compareNameToIgnoreCase, compareTo, equalsExtTo, equalsExtTo, isConnected, startsWithIgnoreCase
getConsole, getDataType, getInputStream, getOutputStream, getOutputStream, newFileChild, newFileRename
String getHost()
String getAbsolutePath()
int getPathDepth()
CoFile getPathFragment(int depth)
String[] getPathArray()
[Server-name]/[Disk-root]
[1st-level-parent-dir-name]
[2nd-level-parent-dir-name]
...
[Top-level-parent-dir-name]
String getName()
String getParent()
boolean delete() throws SecurityException
SecurityException
boolean mkdir() throws SecurityException
SecurityException
boolean mkdirs() throws SecurityException
SecurityException
boolean renameTo(CoFile dest) throws SecurityException
SecurityException
long length()
long lastModified()
String lastModifiedString()
boolean isAbsolute()
boolean isDirectory()
boolean isFile()
boolean isSpecial()
boolean isLink()
boolean isHidden()
boolean canRead()
boolean canWrite()
boolean exists()
String getAccess()
String propertyString()
CoFile[] listCoRoots()
CoFile[] listCoFiles() throws SecurityException
SecurityException
CoFile[] listCoFiles(CoFilenameFilter filter) throws SecurityException
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.SecurityException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses