commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r789328 - in /commons/sandbox/runtime/trunk/src: main/java/org/apache/commons/runtime/io/FileAttributes.java test/org/apache/commons/runtime/TestFile.java
Date Mon, 29 Jun 2009 14:00:02 GMT
Author: mturk
Date: Mon Jun 29 14:00:02 2009
New Revision: 789328

URL: http://svn.apache.org/viewvc?rev=789328&view=rev
Log:
Rename READ to READONLY. It actually is read only mode

Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileAttributes.java
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileAttributes.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileAttributes.java?rev=789328&r1=789327&r2=789328&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileAttributes.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileAttributes.java
Mon Jun 29 14:00:02 2009
@@ -24,7 +24,7 @@
 public enum FileAttributes
 {
     /** File is read-only */
-    READ(       0x01),
+    READONLY(   0x01),
     /** File is executable */
     EXECUTABLE( 0x02),
     /** File is hidden */
@@ -74,3 +74,4 @@
         return set;
     }
 }
+

Modified: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java?rev=789328&r1=789327&r2=789328&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java (original)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java Mon Jun
29 14:00:02 2009
@@ -226,12 +226,12 @@
         System.out.println();
         System.out.println("Org Attr Protection " + fp);
         // Set the rdonly attributes
-        f.setFileAttributes(EnumSet.of(FileAttributes.READ), EnumSet.of(FileAttributes.READ));
+        f.setFileAttributes(EnumSet.of(FileAttributes.READONLY), EnumSet.of(FileAttributes.READONLY));
         EnumSet <FileProtection> np = f.getFileProtection();
         System.out.println("Set Attr Protection " + np);
         assertFalse("UWRITE", np.contains(FileProtection.UWRITE));
         // Clear the rdonly attribute so we can delete the file
-        f.setFileAttributes(EnumSet.noneOf(FileAttributes.class), EnumSet.of(FileAttributes.READ));
+        f.setFileAttributes(EnumSet.noneOf(FileAttributes.class), EnumSet.of(FileAttributes.READONLY));
         f.delete();
     }
 
@@ -244,9 +244,9 @@
         System.out.println();
         System.out.println("Org Rdonly Protection " + fp);
         // Set the rdonly attributes
-        f.setFileAttributes(EnumSet.of(FileAttributes.READ), EnumSet.allOf(FileAttributes.class));
+        f.setFileAttributes(EnumSet.of(FileAttributes.READONLY), EnumSet.allOf(FileAttributes.class));
         // Clear the rdonly attributes
-        f.setFileAttributes(EnumSet.noneOf(FileAttributes.class), EnumSet.of(FileAttributes.READ));
+        f.setFileAttributes(EnumSet.noneOf(FileAttributes.class), EnumSet.of(FileAttributes.READONLY));
         EnumSet <FileProtection> np = f.getFileProtection();
         System.out.println("Set Rdonly Protection " + np);
         assertTrue("GWRITE", np.contains(FileProtection.GWRITE));
@@ -261,11 +261,11 @@
         EnumSet <FileProtection> fp = f.getFileProtection();
         System.out.println();
         System.out.println("Org Clear Protection " + fp);
-        f.setFileAttributes(EnumSet.allOf(FileAttributes.class), EnumSet.of(FileAttributes.READ,
FileAttributes.EXECUTABLE));
+        f.setFileAttributes(EnumSet.allOf(FileAttributes.class), EnumSet.of(FileAttributes.READONLY,
FileAttributes.EXECUTABLE));
         EnumSet <FileProtection> cp = f.getFileProtection();
         System.out.println("Rst Clear Protection " + cp);
         // Clear the rdonly attributes
-        f.setFileAttributes(EnumSet.noneOf(FileAttributes.class), EnumSet.of(FileAttributes.READ));
+        f.setFileAttributes(EnumSet.noneOf(FileAttributes.class), EnumSet.of(FileAttributes.READONLY));
         EnumSet <FileProtection> np = f.getFileProtection();
         System.out.println("Set Clear Protection " + np);
         assertTrue("UEXECUTE", np.contains(FileProtection.UEXECUTE));



Mime
View raw message