FileDirectory.st
changeset 2708 6c4a4f30d540
parent 2590 6855cfa1e628
child 2859 3fdccb7b5134
equal deleted inserted replaced
2707:280456505357 2708:6c4a4f30d540
   196     lazy ifTrue:[self getFullPathName].
   196     lazy ifTrue:[self getFullPathName].
   197     ^ OperatingSystem baseNameOf:pathName
   197     ^ OperatingSystem baseNameOf:pathName
   198 !
   198 !
   199 
   199 
   200 contents 
   200 contents 
   201     "return a collection with all files and subdirectories in the receiver"
   201     "return a collection with all files and subdirectories in the receiver.
       
   202      Skips any '.' or '..' entries (UNIX)"
   202 
   203 
   203     |coll|
   204     |coll|
   204 
   205 
   205     coll := OrderedCollection new.
   206     coll := OrderedCollection new.
   206     self do:[:name |
   207     self do:[:name |
   207 	coll add:name
   208         name ~= '.' ifTrue:[
       
   209             name ~= '..' ifTrue:[
       
   210                 coll add:name
       
   211             ]
       
   212         ]
   208     ].
   213     ].
   209     coll sort.
   214     coll sort.
   210     ^ coll
   215     ^ coll
       
   216 
       
   217     "Modified: 20.6.1997 / 17:05:43 / cg"
   211 !
   218 !
   212 
   219 
   213 directories
   220 directories
   214     "return a collection with all subdirectories in the receiver directory"
   221     "return a collection with all subdirectories in the receiver directory"
   215 
   222 
   618 ! !
   625 ! !
   619 
   626 
   620 !FileDirectory class methodsFor:'documentation'!
   627 !FileDirectory class methodsFor:'documentation'!
   621 
   628 
   622 version
   629 version
   623     ^ '$Header: /cvs/stx/stx/libbasic/FileDirectory.st,v 1.29 1997-04-28 20:35:16 cg Exp $'
   630     ^ '$Header: /cvs/stx/stx/libbasic/FileDirectory.st,v 1.30 1997-06-20 15:30:50 cg Exp $'
   624 ! !
   631 ! !
   625 FileDirectory initialize!
   632 FileDirectory initialize!