FileDirectory.st
changeset 2708 6c4a4f30d540
parent 2590 6855cfa1e628
child 2859 3fdccb7b5134
--- a/FileDirectory.st	Fri Jun 20 17:30:23 1997 +0200
+++ b/FileDirectory.st	Fri Jun 20 17:30:50 1997 +0200
@@ -198,16 +198,23 @@
 !
 
 contents 
-    "return a collection with all files and subdirectories in the receiver"
+    "return a collection with all files and subdirectories in the receiver.
+     Skips any '.' or '..' entries (UNIX)"
 
     |coll|
 
     coll := OrderedCollection new.
     self do:[:name |
-	coll add:name
+        name ~= '.' ifTrue:[
+            name ~= '..' ifTrue:[
+                coll add:name
+            ]
+        ]
     ].
     coll sort.
     ^ coll
+
+    "Modified: 20.6.1997 / 17:05:43 / cg"
 !
 
 directories
@@ -620,6 +627,6 @@
 !FileDirectory class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/FileDirectory.st,v 1.29 1997-04-28 20:35:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/FileDirectory.st,v 1.30 1997-06-20 15:30:50 cg Exp $'
 ! !
 FileDirectory initialize!