Methods Summary |
---|
public abstract java.lang.String | canonicalize(java.lang.String path)
|
public abstract boolean | checkAccess(java.io.File f, int access)Check whether the file or directory denoted by the given abstract
pathname may be accessed by this process. The second argument specifies
which access, ACCESS_READ, ACCESS_WRITE or ACCESS_EXECUTE, to check.
Return false if access is denied or an I/O error occurs
|
public abstract int | compare(java.io.File f1, java.io.File f2)Compare two abstract pathnames lexicographically.
|
public abstract boolean | createDirectory(java.io.File f)Create a new directory denoted by the given abstract pathname,
returning true if and only if the operation succeeds.
|
public abstract boolean | createFileExclusively(java.lang.String pathname)Create a new empty file with the given pathname. Return
true if the file was created and false if a
file or directory with the given pathname already exists. Throw an
IOException if an I/O error occurs.
|
public abstract boolean | delete(java.io.File f)Delete the file or directory denoted by the given abstract pathname,
returning true if and only if the operation succeeds.
|
public abstract java.lang.String | fromURIPath(java.lang.String path)Post-process the given URI path string if necessary. This is used on
win32, e.g., to transform "/c:/foo" into "c:/foo". The path string
still has slash separators; code in the File class will translate them
after this method returns.
|
public abstract int | getBooleanAttributes(java.io.File f)Return the simple boolean attributes for the file or directory denoted
by the given abstract pathname, or zero if it does not exist or some
other I/O error occurs.
|
private static boolean | getBooleanProperty(java.lang.String prop, boolean defaultVal)
String val = System.getProperty(prop);
if (val == null) return defaultVal;
if (val.equalsIgnoreCase("true")) {
return true;
} else {
return false;
}
|
public abstract java.lang.String | getDefaultParent()Return the parent pathname string to be used when the parent-directory
argument in one of the two-argument File constructors is the empty
pathname.
|
public static native java.io.FileSystem | getFileSystem()Return the FileSystem object representing this platform's local
filesystem.
|
public abstract long | getLastModifiedTime(java.io.File f)Return the time at which the file or directory denoted by the given
abstract pathname was last modified, or zero if it does not exist or
some other I/O error occurs.
|
public abstract long | getLength(java.io.File f)Return the length in bytes of the file denoted by the given abstract
pathname, or zero if it does not exist, is a directory, or some other
I/O error occurs.
|
public abstract char | getPathSeparator()Return the local filesystem's path-separator character.
|
public abstract char | getSeparator()Return the local filesystem's name-separator character.
|
public abstract long | getSpace(java.io.File f, int t)
|
public abstract int | hashCode(java.io.File f)Compute the hash code of an abstract pathname.
|
public abstract boolean | isAbsolute(java.io.File f)Tell whether or not the given abstract pathname is absolute.
|
public abstract java.lang.String[] | list(java.io.File f)List the elements of the directory denoted by the given abstract
pathname. Return an array of strings naming the elements of the
directory if successful; otherwise, return null .
|
public abstract java.io.File[] | listRoots()List the available filesystem roots.
|
public abstract java.lang.String | normalize(java.lang.String path)Convert the given pathname string to normal form. If the string is
already in normal form then it is simply returned.
|
public abstract int | prefixLength(java.lang.String path)Compute the length of this pathname string's prefix. The pathname
string must be in normal form.
|
public abstract boolean | rename(java.io.File f1, java.io.File f2)Rename the file or directory denoted by the first abstract pathname to
the second abstract pathname, returning true if and only if
the operation succeeds.
|
public abstract java.lang.String | resolve(java.io.File f)Resolve the given abstract pathname into absolute form. Invoked by the
getAbsolutePath and getCanonicalPath methods in the File class.
|
public abstract java.lang.String | resolve(java.lang.String parent, java.lang.String child)Resolve the child pathname string against the parent.
Both strings must be in normal form, and the result
will be in normal form.
|
public abstract boolean | setLastModifiedTime(java.io.File f, long time)Set the last-modified time of the file or directory denoted by the
given abstract pathname, returning true if and only if the
operation succeeds.
|
public abstract boolean | setPermission(java.io.File f, int access, boolean enable, boolean owneronly)Set on or off the access permission (to owner only or to all) to the file
or directory denoted by the given abstract pathname, based on the parameters
enable, access and oweronly.
|
public abstract boolean | setReadOnly(java.io.File f)Mark the file or directory denoted by the given abstract pathname as
read-only, returning true if and only if the operation
succeeds.
|