AbstractFileBrowser.st
changeset 5973 0baf6c6b685f
parent 5971 af337e1a857f
child 5977 66af015a4a18
--- a/AbstractFileBrowser.st	Fri Aug 13 21:25:29 2004 +0200
+++ b/AbstractFileBrowser.st	Fri Aug 13 21:27:55 2004 +0200
@@ -6142,7 +6142,7 @@
     "get stat info on selected file - return a string which can be
      shown in a box"
 
-    |selFiles filename fileOutput type modeBits modeString s isLink info 
+    |selFiles filename fileOutput modeBits modeString s info
      sizeString fileSize tAccess tModification buffer|
 
     selFiles := self currentFileNameHolder value.
@@ -6155,38 +6155,29 @@
         nextPutAll:'filename: '; 
         nextPutLine:filename asString.
 
-    isLink := filename isSymbolicLink.
-
     buffer nextPutAll:'type:   '.
 
-    info := filename info.
-    isLink ifTrue:[
-        info isNil ifTrue:[
+    info := filename linkInfo.
+    info isSymbolicLink ifTrue:[
+        filename exists ifFalse:[
             buffer nextPutAll:'broken '.
         ].
         buffer 
             nextPutAll:'symbolic link to: ';
-            nextPutLine:(filename linkInfo path).
+            nextPutLine:info path.
     ] ifFalse:[
-        type := info type.
-        (longInfo and:[type == #regular]) ifTrue:[
+        (longInfo and:[info isRegular]) ifTrue:[
             fileOutput := filename fileType.
         ].
 
         fileOutput isNil ifTrue:[
-            s := type asString
+            s := info type asString
         ] ifFalse:[
             s := 'regular (' , fileOutput , ')'
         ].
         buffer nextPutLine:s.
     ].
 
-    isLink = true ifTrue:[
-        info := filename linkInfo
-    ] ifFalse:[
-        info := filename info
-    ].
-    
     fileSize := info fileSize.
     sizeString := 'size:   ', fileSize printString.
     longInfo ifTrue:[
@@ -6205,7 +6196,7 @@
 
     buffer nextPutAll:'access: '; nextPutAll:modeString.
     longInfo ifTrue:[
-        buffer space; nextPutAll:(modeBits printStringRadix:8).
+        buffer nextPutAll:' ('; nextPutAll:(modeBits printStringRadix:8); nextPut:$).
     ].
     buffer
         cr;
@@ -6220,16 +6211,16 @@
         tAccess := info accessTime.
         buffer 
             nextPutAll:'last access:       '; 
-            nextPutAll:tAccess asTime printString;
+            nextPutAll:tAccess asDate printString; 
             space;
-            nextPutLine:tAccess asDate printString. 
+            nextPutLine:tAccess asTime printString.
 
         tModification := info modificationTime.
         buffer 
-            nextPutAll:'last modification:       '; 
-            nextPutAll:tModification asTime printString;
+            nextPutAll:'last modification: '; 
+            nextPutAll:tModification asDate printString; 
             space;
-            nextPutLine:tModification asDate printString. 
+            nextPutLine:tModification asTime printString.
     ].
     ^ buffer contents
 !
@@ -6914,5 +6905,5 @@
 !AbstractFileBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.250 2004-08-12 09:22:19 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.251 2004-08-13 19:27:06 stefan Exp $'
 ! !