Anonymous user
Walk a directory/Recursively: Difference between revisions
m
→{{header|Smalltalk}}: several bug fixes that prevented the full deep exploration
m (→{{header|Smalltalk}}: sorted instead of ordered) |
m (→{{header|Smalltalk}}: several bug fixes that prevented the full deep exploration) |
||
Line 466:
cont remove: '.'; remove: '..'.
cont
do: [ :n | |fn ps|
ps := (Directory pathSeparator) asString.
fn := (self name), ps, n.
((File name: fn) isDirectory)
ifTrue: [
twoBlock value: (
(Directory name: fn) wholeContent: aPattern withLevel: (l+1) do: twoBlock.
]
ifFalse: [
(
ifMatched: [ :m |
twoBlock value:
]
]
Line 484 ⟶ 486:
<lang smalltalk>|d|
d := Directory name: '.'.
d wholeContent: '\.st$' do: [ :f :l |
0 to: l do: [ :i | (Character tab) display ].
f displayNl
|