|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.FileSystem java.io.Win32FileSystem
Field Summary | |
private char |
altSlash
|
static int |
BA_DIRECTORY
|
static int |
BA_EXISTS
|
static int |
BA_HIDDEN
|
static int |
BA_REGULAR
|
private ExpiringCache |
cache
|
private static String[] |
driveDirCache
|
private ExpiringCache |
prefixCache
|
private char |
semicolon
|
private char |
slash
|
(package private) static boolean |
useCanonCaches
|
(package private) static boolean |
useCanonPrefixCache
|
Constructor Summary | |
Win32FileSystem()
|
Method Summary | |
private boolean |
access(String path)
|
String |
canonicalize(String path)
|
protected String |
canonicalize0(String path)
|
protected String |
canonicalizeWithPrefix(String canonicalPrefix,
String filename)
|
protected String |
canonicalizeWithPrefix0(String canonicalPrefix,
String pathWithCanonicalPrefix)
|
boolean |
checkAccess(File f,
boolean write)
Check whether the file or directory denoted by the given abstract pathname may be accessed by this process. |
int |
compare(File f1,
File f2)
Compare two abstract pathnames lexicographically. |
boolean |
createDirectory(File f)
Create a new directory denoted by the given abstract pathname, returning true if and only if the operation succeeds. |
boolean |
createFileExclusively(String path)
Create a new empty file with the given pathname. |
boolean |
delete(File f)
Delete the file or directory denoted by the given abstract pathname, returning true if and only if the operation succeeds. |
private boolean |
delete0(File f)
|
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. |
private static int |
driveIndex(char d)
|
String |
fromURIPath(String path)
Post-process the given URI path string if necessary. |
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. |
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. |
private String |
getDrive(String path)
|
private String |
getDriveDirectory(char drive)
|
(package private) String |
getDriveDirectory(int drive)
|
static FileSystem |
getFileSystem()
Return the FileSystem object representing this platform's local filesystem. |
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. |
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. |
char |
getPathSeparator()
Return the local filesystem's path-separator character. |
char |
getSeparator()
Return the local filesystem's name-separator character. |
private String |
getUserPath()
|
int |
hashCode(File f)
Compute the hash code of an abstract pathname. |
private static void |
initIDs()
|
boolean |
isAbsolute(File f)
Tell whether or not the given abstract pathname is absolute. |
private boolean |
isLetter(char c)
|
private boolean |
isSlash(char c)
|
String[] |
list(File f)
List the elements of the directory denoted by the given abstract pathname. |
File[] |
listRoots()
List the available filesystem roots. |
private static int |
listRoots0()
|
String |
normalize(String path)
Convert the given pathname string to normal form. |
private String |
normalize(String path,
int len,
int off)
|
private int |
normalizePrefix(String path,
int len,
StringBuffer sb)
|
(package private) static String |
parentOrNull(String path)
|
int |
prefixLength(String path)
Compute the length of this pathname string's prefix. |
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. |
private boolean |
rename0(File f1,
File f2)
|
String |
resolve(File f)
Resolve the given abstract pathname into absolute form. |
String |
resolve(String parent,
String child)
Resolve the child pathname string against the parent. |
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. |
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. |
private String |
slashify(String p)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final char slash
private final char altSlash
private final char semicolon
private static String[] driveDirCache
private ExpiringCache cache
private ExpiringCache prefixCache
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 |
public Win32FileSystem()
Method Detail |
private boolean isSlash(char c)
private boolean isLetter(char c)
private String slashify(String p)
public char getSeparator()
FileSystem
getSeparator
in class FileSystem
public char getPathSeparator()
FileSystem
getPathSeparator
in class FileSystem
private int normalizePrefix(String path, int len, StringBuffer sb)
private String normalize(String path, int len, int off)
public String normalize(String path)
FileSystem
normalize
in class FileSystem
public int prefixLength(String path)
FileSystem
prefixLength
in class FileSystem
public String resolve(String parent, String child)
FileSystem
resolve
in class FileSystem
public String getDefaultParent()
FileSystem
getDefaultParent
in class FileSystem
public String fromURIPath(String path)
FileSystem
fromURIPath
in class FileSystem
public boolean isAbsolute(File f)
FileSystem
isAbsolute
in class FileSystem
String getDriveDirectory(int drive)
private static int driveIndex(char d)
private String getDriveDirectory(char drive)
private String getUserPath()
private String getDrive(String path)
public String resolve(File f)
FileSystem
resolve
in class FileSystem
public String canonicalize(String path) throws IOException
canonicalize
in class FileSystem
IOException
protected String canonicalize0(String path) throws IOException
IOException
protected String canonicalizeWithPrefix(String canonicalPrefix, String filename) throws IOException
IOException
protected String canonicalizeWithPrefix0(String canonicalPrefix, String pathWithCanonicalPrefix) throws IOException
IOException
static String parentOrNull(String path)
public int getBooleanAttributes(File f)
FileSystem
getBooleanAttributes
in class FileSystem
public boolean checkAccess(File f, boolean write)
FileSystem
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.
checkAccess
in class FileSystem
public long getLastModifiedTime(File f)
FileSystem
getLastModifiedTime
in class FileSystem
public long getLength(File f)
FileSystem
getLength
in class FileSystem
public boolean createFileExclusively(String path) throws IOException
FileSystem
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.
createFileExclusively
in class FileSystem
IOException
public boolean delete(File f)
FileSystem
true
if and only if the operation succeeds.
delete
in class FileSystem
private boolean delete0(File f)
public boolean deleteOnExit(File f)
FileSystem
true
if
and only if the operation succeeds.
deleteOnExit
in class FileSystem
public String[] list(File f)
FileSystem
null
.
list
in class FileSystem
public boolean createDirectory(File f)
FileSystem
true
if and only if the operation succeeds.
createDirectory
in class FileSystem
public boolean rename(File f1, File f2)
FileSystem
true
if and only if
the operation succeeds.
rename
in class FileSystem
private boolean rename0(File f1, File f2)
public boolean setLastModifiedTime(File f, long time)
FileSystem
true
if and only if the
operation succeeds.
setLastModifiedTime
in class FileSystem
public boolean setReadOnly(File f)
FileSystem
true
if and only if the operation
succeeds.
setReadOnly
in class FileSystem
private boolean access(String path)
private static int listRoots0()
public File[] listRoots()
FileSystem
listRoots
in class FileSystem
public int compare(File f1, File f2)
FileSystem
compare
in class FileSystem
public int hashCode(File f)
FileSystem
hashCode
in class FileSystem
private static void initIDs()
public static FileSystem getFileSystem()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |