2 d@(File Locator traits) maskedEntries: mask@(String traits) do: block
4 d maskedEntries: (Glob newOn: mask) do: block
7 l maskedEntries: mask@(Regex Regex traits) do: block
9 l maskedEntries: (Regex Matcher newOn: mask) do: block
12 l@(File Locator traits) maskedEntries: mask do: block
14 (Directory new `>> [locator := l. ]) maskedEntries: mask do: block
17 l@(File Locator traits) collectMasked: mask
19 [| :result | l maskedEntries: mask do: #(result nextPut: _) `er]
23 d@(File Locator traits) /* mask
24 [d collectMasked: mask].
26 d@(Directory traits) /* mask
27 [d locator collectMasked: mask].
29 d@(Directory traits) maskedEntries: mask do: block
34 [| :each | (mask matches: each) ifTrue:
35 [block applyWith: (File Locator new `>> [readFilenameFrom: each. ])]])].
38 d@(Directory traits) find: block &maxDepth: maxDepth
40 maxDepth `defaultsTo: PositiveInfinity.
41 result ::= Set new writer.
42 d select: block into: result depth: maxDepth.
46 d@(Directory traits) select: block into: result depth: maxDepth
48 maxDepth isZero ifFalse:
49 [entries ::= d entries collect:
50 [| :each | (File RelativeLocator newFrom: d) `>> [readPathElementsFrom: each reader. ]].
51 ((reader ::= entries reader) select: block) >> result.
54 (info := each fileInfo) isNotNil /\ [info isDirectory] /\ [info isLink not]
55 /\ [each name ~= '..'] /\ [each name ~= '.']
56 ifTrue: [(d childNamed: each name) select: block into: result depth: maxDepth - 1]]]