/[classpath]/classpath/vm/reference/java/io/VMFile.java
ViewVC logotype

Diff of /classpath/vm/reference/java/io/VMFile.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3.2.1 by gnu_andrew, Fri Jan 14 10:24:18 2005 UTC revision 1.3.2.2 by gnu_andrew, Sun Jan 16 02:14:50 2005 UTC
# Line 47  import gnu.java.io.PlatformHelper; Line 47  import gnu.java.io.PlatformHelper;
47   */   */
48  final class VMFile  final class VMFile
49  {  {
50    static boolean caseSensitive;    // FIXME: We support only case sensitive filesystems currently.
51              static final boolean IS_CASE_SENSITIVE = true;
52      static final boolean IS_DOS_8_3 = false;
53    
54    static    static
55    {    {
56      if (Configuration.INIT_LOAD_LIBRARY)      if (Configuration.INIT_LOAD_LIBRARY)
57        {        {
58          System.loadLibrary("javaio");          System.loadLibrary("javaio");
59        }        }
   
     // FIXME: We support only caseSensitive filesystems currently.  
     caseSensitive = true;  
60    }    }
61      
62    /*    /*
63     * This native method does the actual work of getting the last file     * This native method does the actual work of getting the last file
64     * modification time.  It also does the existence check to avoid the     * modification time.  It also does the existence check to avoid the
# Line 127  final class VMFile Line 126  final class VMFile
126    static synchronized native boolean canWrite(String path);    static synchronized native boolean canWrite(String path);
127    
128    /**    /**
129       * This methods checks if a directory can be written to.
130       */
131      static boolean canWriteDirectory(File dir)
132      {
133        try
134          {
135            String filename = IS_DOS_8_3 ? "tst" : "test-dir-write";
136            File test = File.createTempFile(filename, null, dir);
137            return (test != null && test.delete());
138          }
139        catch (IOException ioe)
140          {
141            return false;
142          }
143      }
144    
145      /**
146     * This native method checks file permissions for reading     * This native method checks file permissions for reading
147     */     */
148    static synchronized native boolean canRead(String path);    static synchronized native boolean canRead(String path);

Legend:
Removed from v.1.3.2.1  
changed lines
  Added in v.1.3.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26