Filename.st
changeset 249 810798c5c2e5
parent 216 a8abff749575
child 276 3b6d97620494
--- a/Filename.st	Sat Feb 11 17:42:24 1995 +0100
+++ b/Filename.st	Wed Feb 15 11:22:05 1995 +0100
@@ -20,7 +20,7 @@
 COPYRIGHT (c) 1992 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.19 1995-02-02 12:21:12 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.20 1995-02-15 10:22:05 claus Exp $
 '!
 
 !Filename class methodsFor:'documentation'!
@@ -41,7 +41,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.19 1995-02-02 12:21:12 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.20 1995-02-15 10:22:05 claus Exp $
 "
 !
 
@@ -132,9 +132,9 @@
 
 !Filename methodsFor:'instance creation'!
 
-construct:subname
+constructString:subname
     "taking the receiver as a directory name, construct a new
-     filename for an entry within this directory (i.e. for a file
+     filenames string for an entry within this directory (i.e. for a file
      or a subdirectory in that directory)."
 
     |newName sepString|
@@ -146,12 +146,26 @@
     ] ifFalse:[
 	newName := nameString , sepString , subname
     ].
-    ^ (self class basicNew) setName:newName
+    ^ newName
 
     "
-     ('/tmp' asFilename construct:'foo') asString    
-     ('/' asFilename construct:'foo') asString         
-     ('/usr/tmp' asFilename construct:'foo') asString
+     '/tmp' asFilename constructString:'foo'   
+     '/' asFilename constructString:'foo'         
+     '/usr/tmp' asFilename constructString:'foo'
+    "
+!
+
+construct:subname
+    "taking the receiver as a directory name, construct a new
+     filename for an entry within this directory (i.e. for a file
+     or a subdirectory in that directory)."
+
+    ^ (self class basicNew) setName:(self constructString:subname)
+
+    "
+     '/tmp' asFilename construct:'foo'    
+     '/' asFilename construct:'foo'         
+     '/usr/tmp' asFilename construct:'foo'
     "
 ! !