Home » openjdk-7 » java » io » [javadoc | source]
java.io
final class: VMFile [javadoc | source]
java.lang.Object
   java.io.VMFile
Field Summary
static final  boolean IS_CASE_SENSITIVE     
static final  boolean IS_DOS_8_3     
Method from java.io.VMFile Summary:
canRead,   canWrite,   canWriteDirectory,   create,   delete,   exists,   getName,   isDirectory,   isFile,   isHidden,   lastModified,   length,   list,   listRoots,   mkdir,   renameTo,   setLastModified,   setReadOnly,   toCanonicalForm
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.io.VMFile Detail:
 static synchronized native boolean canRead(String path)
    This native method checks file permissions for reading
 static synchronized native boolean canWrite(String path)
    This native method checks file permissions for writing
 static boolean canWriteDirectory(File dir) 
    This methods checks if a directory can be written to.
 static native boolean create(String path) throws IOException
    This method is used to create a temporary file
 static native boolean delete(String path)
 static native boolean exists(String path)
 static String getName(String path) 
    This method returns the name of the file. This is everything in the complete path of the file after the last instance of the separator string.
 static native boolean isDirectory(String dirpath)
 static native boolean isFile(String path)
 static boolean isHidden(String path) 
    This method tests whether or not this file represents a "hidden" file. On GNU systems, a file is hidden if its name begins with a "." character. Files with these names are traditionally not shown with directory listing tools.
 static native long lastModified(String path)
 static native long length(String path)
 static native String[] list(String dirpath)
 static File[] listRoots() 
    This method returns an array of filesystem roots. Some operating systems have volume oriented filesystem. This method provides a mechanism for determining which volumes exist. GNU systems use a single hierarchical filesystem, so will have only one "/" filesystem root.
 static native boolean mkdir(String dirpath)
 static native boolean renameTo(String targetpath,
    String destpath)
 static native boolean setLastModified(String path,
    long time)
 static native boolean setReadOnly(String path)
 public static String toCanonicalForm(String path) throws IOException 
    This method returns a canonical representation of the pathname of the given path. The actual form of the canonical representation is different. On the GNU system, the canonical form differs from the absolute form in that all relative file references to "." and ".." are resolved and removed.

    Note that this method, unlike the other methods which return path names, can throw an IOException. This is because native method might be required in order to resolve the canonical path