UnixFilename.st
changeset 16581 93a7592ed3bd
parent 15809 0e232d8cd453
child 16754 0e2a27636731
--- a/UnixFilename.st	Sat Jun 14 11:24:57 2014 +0200
+++ b/UnixFilename.st	Sat Jun 14 11:28:32 2014 +0200
@@ -117,7 +117,7 @@
          it is only useful for user-information; 
          NOT as a tag to be used by a program."
 
-    |stream typeString|
+    |typeString|
 
     "/ since executing 'file' takes some time, do the most common
     "/ ones are checked first, using the general fileType implementation. 
@@ -126,10 +126,8 @@
     typeString := super fileType.
     typeString ~= 'file' ifTrue:[^ typeString].
 
-    stream := PipeStream readingFrom:('file "' , self pathName , '"').
-    stream notNil ifTrue:[
-        typeString := stream contents asString.
-        stream close.
+    typeString := PipeStream outputFromCommand:('file "' , self pathName , '"').
+    typeString notNil ifTrue:[
         typeString := typeString copyFrom:(typeString indexOf:$:) + 1.
         typeString := typeString withoutSeparators
     ].
@@ -142,6 +140,7 @@
      'smalltalk.rc' asFilename fileType    
      'bitmaps/SBrowser.xbm' asFilename fileType    
      '../../libtool/bitmaps/SBrowser.xbm' asFilename fileType    
+     './stx' asFilename fileType    
     "
 
     "Modified: / 21.7.1998 / 11:26:32 / cg"
@@ -196,10 +195,10 @@
 !UnixFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UnixFilename.st,v 1.20 2013-11-13 10:37:55 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnixFilename.st,v 1.21 2014-06-14 09:28:32 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/UnixFilename.st,v 1.20 2013-11-13 10:37:55 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnixFilename.st,v 1.21 2014-06-14 09:28:32 cg Exp $'
 ! !