Filename>>#filesMatching: and subdirectories?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Filename>>#filesMatching: and subdirectories?

Henrik Sperre Johansen
In the last part of the method:

1 to: contents size do:
                [:i | | name |
                name := contents at: i.
                (pref match: name ignoreCase: isCaseSensitive not)
                        ifTrue:
                                [fullName := self construct: name.
                                sublist isEmpty
                                        ifTrue: [allNames add: fullName asString]
                                        ifFalse: [([fullName isDirectory]
                                                                on: OSErrorHolder errorSignal
                                                                do: [:ex | ex return: false])
                                                ifTrue: [fullName filesMatchingAccessList: sublist into: allNames]]]]


ie. it first does the matching of pref string to the directory name, and only searches the subfolder contents if it too matches the argument of filesMatching:.

Is this intended, in that the file search is supposed to be conditionally recursive, or is it a simple misordering of #match:/#isDirectory checks?

Cheers,
Henry
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc