UnixFilename.st
changeset 8946 49e64eef0a55
parent 8752 3e7429854c55
child 9931 d43f06e92188
--- a/UnixFilename.st	Wed Sep 28 13:10:14 2005 +0200
+++ b/UnixFilename.st	Thu Sep 29 10:10:03 2005 +0200
@@ -197,58 +197,10 @@
 
     "Modified: / 18.9.1997 / 18:03:28 / stefan"
     "Modified: / 21.7.1998 / 11:10:42 / cg"
-!
-
-nameWithSpecialExpansions:aString
-    "return the nameString, expanding any OS specific macros. 
-     Here, a ~ prefix is expanded to the users home dir (as in csh)"
-
-    |dir user cutIdx idx userInfo|
-
-    (aString startsWith:'~') ifTrue:[
-        dir := OperatingSystem getHomeDirectory.
-        cutIdx := 2.
-        "/ look for ~username
-        (aString size > 1) ifTrue:[
-            idx := aString indexOf:$/.
-            idx == 0 ifTrue:[
-                user := aString copyFrom:2.
-                cutIdx := aString size + 1.
-            ] ifFalse:[
-                user := aString copyFrom:2 to:(idx - 1).
-                cutIdx := idx.
-            ].
-            user size > 0 ifTrue:[
-                userInfo := OperatingSystem userInfoOf:user.
-                (userInfo notNil and:[userInfo includesKey:#dir]) ifTrue:[
-                    dir := userInfo at:#dir
-                ] ifFalse:[
-                    dir := nil
-                ]
-            ].
-            dir isNil ifTrue:[
-"/                ('Filename [info]: unknown user: ' , user) infoPrintCR.
-                ^ aString
-            ].
-        ].
-        ^ dir , (aString copyFrom:cutIdx)
-    ].
-    ^ aString
-
-    "
-     UnixFilename new nameWithSpecialExpansions:'~'      
-     UnixFilename new nameWithSpecialExpansions:'~/work'  
-     UnixFilename new nameWithSpecialExpansions:'~sv'     
-     UnixFilename new nameWithSpecialExpansions:'~sv/work' 
-     UnixFilename new nameWithSpecialExpansions:'~foo'    
-     UnixFilename new nameWithSpecialExpansions:'~foo/bar' 
-    "
-
-    "Modified: / 21.7.1998 / 11:09:59 / cg"
 ! !
 
 !UnixFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UnixFilename.st,v 1.11 2005-02-23 11:49:35 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnixFilename.st,v 1.12 2005-09-29 08:10:00 cg Exp $'
 ! !