UnixOperatingSystem.st
changeset 10586 7249c850299f
parent 10406 0c022c8d3f80
child 10662 865a5649d8d6
--- a/UnixOperatingSystem.st	Thu May 31 17:59:26 2007 +0200
+++ b/UnixOperatingSystem.st	Thu May 31 18:00:24 2007 +0200
@@ -10542,12 +10542,6 @@
     ^ size
 !
 
-fixedHeaderSize
-    "return the fixedHeaderSize (VMS only; nil everywhere else)"
-
-    ^ nil
-!
-
 gid
     "return gid"
 
@@ -10589,6 +10583,34 @@
 
 !
 
+statusChangeTime
+    statusChanged isInteger ifTrue:[
+	"/ lazy time conversion
+	statusChanged := Timestamp fromOSTime:(statusChanged * 1000).
+    ].
+    ^ statusChanged
+!
+
+type
+    "return type"
+
+    ^ type
+!
+
+uid
+    "return uid"
+
+    ^ uid
+! !
+
+!UnixOperatingSystem::FileStatusInfo methodsFor:'accessing-vms'!
+
+fixedHeaderSize
+    "return the fixedHeaderSize (VMS only; nil everywhere else)"
+
+    ^ nil
+!
+
 recordAttributes
     "return the recordAttributes (VMS only; nil everywhere else)"
 
@@ -10611,26 +10633,6 @@
     "return the recordSize (VMS only; nil everywhere else)"
 
     ^ nil
-!
-
-statusChangeTime
-    statusChanged isInteger ifTrue:[
-	"/ lazy time conversion
-	statusChanged := Timestamp fromOSTime:(statusChanged * 1000).
-    ].
-    ^ statusChanged
-!
-
-type
-    "return type"
-
-    ^ type
-!
-
-uid
-    "return uid"
-
-    ^ uid
 ! !
 
 !UnixOperatingSystem::FileStatusInfo methodsFor:'backward compatibility'!
@@ -10657,12 +10659,6 @@
     ^ self modificationTime
 !
 
-size
-    "return size"
-
-    ^ size
-!
-
 statusChanged
     <resource:#obsolete>
 
@@ -10686,7 +10682,81 @@
     numLinks := nL.
 ! !
 
-!UnixOperatingSystem::FileStatusInfo methodsFor:'queries'!
+!UnixOperatingSystem::FileStatusInfo methodsFor:'queries-access'!
+
+isGroupExecutable
+    ^ mode bitTest:8r10
+
+    "
+      '/etc/passwd' asFilename info isGroupExecutable
+    "
+!
+
+isGroupReadable
+    ^ mode bitTest:8r40
+
+    "
+      '/etc/passwd' asFilename info isGroupReadable
+    "
+!
+
+isGroupWritable
+    ^ mode bitTest:8r20
+
+    "
+      '/etc/passwd' asFilename info isGroupWritable
+    "
+!
+
+isOwnerExecutable
+    ^ mode bitTest:8r100
+
+    "
+      '/etc/passwd' asFilename info isOwnerExecutable
+    "
+!
+
+isOwnerReadable
+    ^ mode bitTest:8r400
+
+    "
+      '/etc/passwd' asFilename info isOwnerReadable
+    "
+!
+
+isOwnerWritable
+    ^ mode bitTest:8r200
+
+    "
+      '/etc/passwd' asFilename info isOwnerWritable
+    "
+!
+
+isWorldExecutable
+    ^ mode bitTest:8r1
+
+    "
+      '/etc/passwd' asFilename info isWorldExecutable
+    "
+!
+
+isWorldReadable
+    ^ mode bitTest:8r4
+
+    "
+      '/etc/passwd' asFilename info isWorldReadable
+    "
+!
+
+isWorldWritable
+    ^ mode bitTest:8r2
+
+    "
+      '/etc/passwd' asFilename info isWorldWritable
+    "
+! !
+
+!UnixOperatingSystem::FileStatusInfo methodsFor:'queries-type'!
 
 isBlockSpecial
     ^ type == #blockSpecial
@@ -12455,7 +12525,7 @@
 !UnixOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.239 2007-02-22 15:23:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.240 2007-05-31 16:00:24 stefan Exp $'
 ! !
 
 UnixOperatingSystem initialize!