|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.FileSystem
Package-private abstract class for the local filesystem abstraction.
Field Summary | |
static int |
BA_DIRECTORY
|
static int |
BA_EXISTS
|
static int |
BA_HIDDEN
|
static int |
BA_REGULAR
|
(package private) static boolean |
useCanonCaches
|
(package private) static boolean |
useCanonPrefixCache
|
Constructor Summary | |
(package private) |
FileSystem()
|
Method Summary | |
abstract String |
canonicalize(String path)
|
abstract boolean |
checkAccess(File f,
boolean write)
Check whether the file or directory denoted by the given abstract pathname may be accessed by this process. |
abstract int |
compare(File f1,
File f2)
Compare two abstract pathnames lexicographically. |
abstract boolean |
createDirectory(File f)
Create a new directory denoted by the given abstract pathname, returning true if and only if the operation succeeds. |
abstract boolean |
createFileExclusively(String pathname)
Create a new empty file with the given pathname. |
abstract boolean |
delete(File f)
Delete the file or directory denoted by the given abstract pathname, returning true if and only if the operation succeeds. |
abstract boolean |
deleteOnExit(File f)
Arrange for the file or directory denoted by the given abstract pathname to be deleted when the VM exits, returning true if
and only if the operation succeeds. |
abstract String |
fromURIPath(String path)
Post-process the given URI path string if necessary. |
abstract int |
getBooleanAttributes(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(String prop,
boolean defaultVal)
|
abstract 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. |
static FileSystem |
getFileSystem()
Return the FileSystem object representing this platform's local filesystem. |
abstract long |
getLastModifiedTime(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. |
abstract long |
getLength(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. |
abstract char |
getPathSeparator()
Return the local filesystem's path-separator character. |
abstract char |
getSeparator()
Return the local filesystem's name-separator character. |
abstract int |
hashCode(File f)
Compute the hash code of an abstract pathname. |
abstract boolean |
isAbsolute(File f)
Tell whether or not the given abstract pathname is absolute. |
abstract String[] |
list(File f)
List the elements of the directory denoted by the given abstract pathname. |
abstract File[] |
listRoots()
List the available filesystem roots. |
abstract String |
normalize(String path)
Convert the given pathname string to normal form. |
abstract int |
prefixLength(String path)
Compute the length of this pathname string's prefix. |
abstract boolean |
rename(File f1,
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. |
abstract String |
resolve(File f)
Resolve the given abstract pathname into absolute form. |
abstract String |
resolve(String parent,
String child)
Resolve the child pathname string against the parent. |
abstract boolean |
setLastModifiedTime(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. |
abstract boolean |
setReadOnly(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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BA_EXISTS
public static final int BA_REGULAR
public static final int BA_DIRECTORY
public static final int BA_HIDDEN
static boolean useCanonCaches
static boolean useCanonPrefixCache
Constructor Detail |
FileSystem()
Method Detail |
public static FileSystem getFileSystem()
public abstract char getSeparator()
public abstract char getPathSeparator()
public abstract String normalize(String path)
public abstract int prefixLength(String path)
public abstract String resolve(String parent, String child)
public abstract String getDefaultParent()
public abstract String fromURIPath(String path)
public abstract boolean isAbsolute(File f)
public abstract String resolve(File f)
public abstract String canonicalize(String path) throws IOException
IOException
public abstract int getBooleanAttributes(File f)
public abstract boolean checkAccess(File f, boolean write)
false
, then a check for read access is made; if the second
argument is true
, then a check for write (not read-write)
access is made. Return false if access is denied or an I/O error
occurs.
public abstract long getLastModifiedTime(File f)
public abstract long getLength(File f)
public abstract boolean createFileExclusively(String pathname) throws IOException
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.
IOException
public abstract boolean delete(File f)
true
if and only if the operation succeeds.
public abstract boolean deleteOnExit(File f)
true
if
and only if the operation succeeds.
public abstract String[] list(File f)
null
.
public abstract boolean createDirectory(File f)
true
if and only if the operation succeeds.
public abstract boolean rename(File f1, File f2)
true
if and only if
the operation succeeds.
public abstract boolean setLastModifiedTime(File f, long time)
true
if and only if the
operation succeeds.
public abstract boolean setReadOnly(File f)
true
if and only if the operation
succeeds.
public abstract File[] listRoots()
public abstract int compare(File f1, File f2)
public abstract int hashCode(File f)
private static boolean getBooleanProperty(String prop, boolean defaultVal)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |