changed: #withoutHiddenFiles:
authorClaus Gittinger <cg@exept.de>
Wed, 28 Oct 2009 15:26:37 +0100
changeset 9101 d6b039e5916c
parent 9100 885eaa429d6f
child 9102 6beb56becd84
changed: #withoutHiddenFiles:
FileBrowser.st
--- a/FileBrowser.st	Wed Oct 28 12:23:46 2009 +0100
+++ b/FileBrowser.st	Wed Oct 28 15:26:37 2009 +0100
@@ -5345,26 +5345,10 @@
     "remove hidden files (i.e. those that start with '.') from
      the list in aCollection"
 
-    |newCollection|
-
-    newCollection := aCollection species new.
-    aCollection do:[:fname |
-        |ignore|
-
-        ignore := false.
-
-        ((fname startsWith:'.') and:[fname ~= '..']) ifTrue:[
-            showingHiddenFiles value "showDotFiles" ifFalse:[
-                ignore := true
-            ]
-        ].
-        ignore ifFalse:[
-            newCollection add:fname
-        ]
-    ].
-    ^ newCollection
-
-    "Modified: / 4.8.1998 / 13:46:27 / cg"
+    showingHiddenFiles value ifTrue:[
+        ^ aCollection
+    ].
+    ^ aCollection reject:[:fn | fn asFilename isHidden].
 ! !
 
 !FileBrowser methodsFor:'private-actions & command execution'!
@@ -7503,9 +7487,9 @@
 !FileBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.634 2009-10-24 14:02:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.635 2009-10-28 14:26:37 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.634 2009-10-24 14:02:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.635 2009-10-28 14:26:37 cg Exp $'
 ! !