Save This Page
Home » openjdk-7 » java » io » [javadoc | source]
java.io
abstract class: FileSystem [javadoc | source]
java.lang.Object
   java.io.FileSystem

Direct Known Subclasses:
    UnixFileSystem, WinNTFileSystem, Win32FileSystem

Package-private abstract class for the local filesystem abstraction.
Field Summary
public static final  int BA_EXISTS     
public static final  int BA_REGULAR     
public static final  int BA_DIRECTORY     
public static final  int BA_HIDDEN     
public static final  int ACCESS_READ     
public static final  int ACCESS_WRITE     
public static final  int ACCESS_EXECUTE     
public static final  int SPACE_TOTAL     
public static final  int SPACE_FREE     
public static final  int SPACE_USABLE     
static  boolean useCanonCaches     
static  boolean useCanonPrefixCache     
Method from java.io.FileSystem Summary:
canonicalize,   checkAccess,   compare,   createDirectory,   createFileExclusively,   delete,   fromURIPath,   getBooleanAttributes,   getDefaultParent,   getFileSystem,   getLastModifiedTime,   getLength,   getPathSeparator,   getSeparator,   getSpace,   hashCode,   isAbsolute,   list,   listRoots,   normalize,   prefixLength,   rename,   resolve,   resolve,   setLastModifiedTime,   setPermission,   setReadOnly
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.io.FileSystem Detail:
 abstract public String canonicalize(String path) throws IOException
 abstract public 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
 abstract public int compare(File f1,
    File f2)
    Compare two abstract pathnames lexicographically.
 abstract public boolean createDirectory(File f)
    Create a new directory denoted by the given abstract pathname, returning true if and only if the operation succeeds.
 abstract public 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.
 abstract public 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 public 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.
 abstract public 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.
 abstract public 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 FileSystem getFileSystem()
    Return the FileSystem object representing this platform's local filesystem.
 abstract public 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 public 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 public char getPathSeparator()
    Return the local filesystem's path-separator character.
 abstract public char getSeparator()
    Return the local filesystem's name-separator character.
 abstract public long getSpace(File f,
    int t)
 abstract public int hashCode(File f)
    Compute the hash code of an abstract pathname.
 abstract public boolean isAbsolute(File f)
    Tell whether or not the given abstract pathname is absolute.
 abstract public 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.
 abstract public File[] listRoots()
    List the available filesystem roots.
 abstract public 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.
 abstract public int prefixLength(String path)
    Compute the length of this pathname string's prefix. The pathname string must be in normal form.
 abstract public 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 public String resolve(File f)
    Resolve the given abstract pathname into absolute form. Invoked by the getAbsolutePath and getCanonicalPath methods in the File class.
 abstract public 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.
 abstract public 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 public 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.
 abstract public 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.