Filename.st
changeset 883 78d6c8b2b9f0
parent 845 6bcb2386d05a
child 932 f57ec42ceb44
--- a/Filename.st	Thu Jan 18 15:01:29 1996 +0100
+++ b/Filename.st	Thu Jan 18 22:34:08 1996 +0100
@@ -816,12 +816,12 @@
 
     self exists ifFalse:[ ^ self].
     self isDirectory ifTrue:[
-        ok := OperatingSystem removeDirectory:nameString
+	ok := OperatingSystem removeDirectory:nameString
     ] ifFalse:[
-        ok := OperatingSystem removeFile:nameString
+	ok := OperatingSystem removeFile:nameString
     ].
     ok ifFalse:[
-        self removeError:self
+	self removeError:self
     ].
 
     "
@@ -833,7 +833,7 @@
      'foo' asFilename makeDirectory.
      'foo/bar' asFilename writeStream close.
      ('foo' asFilename remove) ifFalse:[
-        Transcript showCr:'could not remove foo'
+	Transcript showCr:'could not remove foo'
      ]
     "
 
@@ -1499,7 +1499,7 @@
 
 name
     "return the name of the file represented by the receiver as a string.
-     This may or may not be a relative name.
+     This may or may not be a relative name (i.e. include ..'s).
      See also: pathName"
 
     self isAbsolute ifTrue:[^ self pathName].
@@ -1511,19 +1511,23 @@
      '.' asFilename name                
      '.' asFilename pathName             
      '../..' asFilename name             
-     '../..' asFilename pathName         
+     '../..' asFilename pathName 
      'bitmaps' asFilename name                
      'bitmaps' asFilename pathName             
      '/tmp/../usr' asFilename name       
-     '/tmp/../usr' asFilename pathName   
+     '/tmp/../usr' asFilename pathName    
+     'source/..' asFilename name    
+     'source/..' asFilename pathName    
+     '/tmp/..' asFilename name    
+     '/tmp/..' asFilename pathName    
     "
 
-    "Modified: 7.9.1995 / 10:41:14 / claus"
+    "Modified: 18.1.1996 / 21:36:27 / cg"
 !
 
 pathName
     "return the full pathname of the file represented by the receiver,
-     as a string. See also: name"
+     as a string. This will not include ..'s. See also: name"
 
     |parentName sep|
 
@@ -1544,7 +1548,7 @@
      '/tmp/../usr' asFilename pathName  
     "
 
-    "Modified: 7.9.1995 / 10:42:39 / claus"
+    "Modified: 18.1.1996 / 21:36:46 / cg"
 !
 
 prefixAndSuffix
@@ -1613,5 +1617,5 @@
 !Filename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.48 1996-01-10 17:45:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.49 1996-01-18 21:34:08 cg Exp $'
 ! !