Top Description Fields Constructors Methods
java.io

pack-priv abstract Class FileSystem

extends Object
Class Inheritance
Known Direct Subclasses
java.io.UnixFileSystem
Imports
java.lang.annotation.Native

Package-private abstract class for the local filesystem abstraction.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public abstract String
public abstract boolean
checkAccess(File f, int access)

Check whether the file or directory denoted by the given abstract pathname may be accessed by this process.

public abstract int
compare(File f1, File f2)

Compare two abstract pathnames lexicographically.

public abstract boolean
createDirectory(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(String pathname)

Create a new empty file with the given pathname.

public 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.

public abstract String
fromURIPath(String path)

Post-process the given URI path string if necessary.

public 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.

public 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.

public 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.

public 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.

public abstract int

Returns:

The maximum length of a file path component.
getNameMax
(String path)

Retrieve the maximum length of a component of a file path.

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(File f, int t)

public boolean
hasBooleanAttributes(File f, int attributes)

Checks if all the given boolean attributes are true for the file or directory denoted by the given abstract pathname.

public abstract int
hashCode(File f)

Compute the hash code of an abstract pathname.

public abstract boolean
isAbsolute(File f)

Tell whether or not the given abstract pathname is absolute.

public abstract boolean
isInvalid(File f)

Tell whether the given abstract pathname is invalid.

public abstract String[]
list(File f)

List the elements of the directory denoted by the given abstract pathname.

public abstract File[]
listRoots()

List the available filesystem roots.

public abstract String
normalize(String path)

Convert the given pathname string to normal form.

public abstract int
prefixLength(String path)

Compute the length of this pathname string's prefix.

public 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.

public abstract String
resolve(String parent, String child)

Resolve the child pathname string against the parent.

public abstract String
resolve(File f)

Resolve the given abstract pathname into absolute form.

public 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.

public abstract boolean
setPermission(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(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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ACCESS_EXECUTEback to summary
public static final int ACCESS_EXECUTE
Annotations
@Native
ACCESS_READback to summary
public static final int ACCESS_READ
Annotations
@Native
ACCESS_WRITEback to summary
public static final int ACCESS_WRITE
Annotations
@Native
BA_DIRECTORYback to summary
public static final int BA_DIRECTORY
Annotations
@Native
BA_EXISTSback to summary
public static final int BA_EXISTS
Annotations
@Native
BA_HIDDENback to summary
public static final int BA_HIDDEN
Annotations
@Native
BA_REGULARback to summary
public static final int BA_REGULAR
Annotations
@Native
SPACE_FREEback to summary
public static final int SPACE_FREE
Annotations
@Native
SPACE_TOTALback to summary
public static final int SPACE_TOTAL
Annotations
@Native
SPACE_USABLEback to summary
public static final int SPACE_USABLE
Annotations
@Native

Constructor Detail

FileSystemback to summary
pack-priv FileSystem()

Method Detail

canonicalizeback to summary
public abstract String canonicalize(String path) throws IOException
checkAccessback to summary
public abstract boolean checkAccess(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

compareback to summary
public abstract int compare(File f1, File f2)

Compare two abstract pathnames lexicographically.

createDirectoryback to summary
public abstract boolean createDirectory(File f)

Create a new directory denoted by the given abstract pathname, returning true if and only if the operation succeeds.

createFileExclusivelyback to summary
public abstract boolean createFileExclusively(String pathname) throws IOException

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.

deleteback to summary
public 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.

fromURIPathback to summary
public abstract String fromURIPath(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.

getBooleanAttributesback to summary
public 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.

getDefaultParentback to summary
public 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.

getLastModifiedTimeback to summary
public 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.

getLengthback to summary
public 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.

getNameMaxback to summary
public abstract int getNameMax(String path)

Retrieve the maximum length of a component of a file path.

Returns:int

The maximum length of a file path component.

getPathSeparatorback to summary
public abstract char getPathSeparator()

Return the local filesystem's path-separator character.

getSeparatorback to summary
public abstract char getSeparator()

Return the local filesystem's name-separator character.

getSpaceback to summary
public abstract long getSpace(File f, int t)
hasBooleanAttributesback to summary
public boolean hasBooleanAttributes(File f, int attributes)

Checks if all the given boolean attributes are true for the file or directory denoted by the given abstract pathname. False if it does not exist or some other I/O error occurs.

hashCodeback to summary
public abstract int hashCode(File f)

Compute the hash code of an abstract pathname.

isAbsoluteback to summary
public abstract boolean isAbsolute(File f)

Tell whether or not the given abstract pathname is absolute.

isInvalidback to summary
public abstract boolean isInvalid(File f)

Tell whether the given abstract pathname is invalid.

listback to summary
public abstract String[] list(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.

listRootsback to summary
public abstract File[] listRoots()

List the available filesystem roots.

normalizeback to summary
public abstract String normalize(String path)

Convert the given pathname string to normal form. If the string is already in normal form then it is simply returned.

prefixLengthback to summary
public abstract int prefixLength(String path)

Compute the length of this pathname string's prefix. The pathname string must be in normal form.

renameback to summary
public 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.

resolveback to summary
public abstract String resolve(String parent, 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.

resolveback to summary
public abstract String resolve(File f)

Resolve the given abstract pathname into absolute form. Invoked by the getAbsolutePath and getCanonicalPath methods in the File class.

setLastModifiedTimeback to summary
public 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.

setPermissionback to summary
public abstract boolean setPermission(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.

setReadOnlyback to summary
public 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.