370 |
370 |
371 !DirectoryView methodsFor:'private'! |
371 !DirectoryView methodsFor:'private'! |
372 |
372 |
373 readDirectory |
373 readDirectory |
374 |
374 |
375 |foundFiles list dir| |
375 |allFiles foundFiles filterList dir| |
376 |
376 |
377 foundFiles := OrderedCollection new. |
377 allFiles := Set new. |
378 list := self listOfFileFilters value. |
378 foundFiles := Set new. |
|
379 filterList := self listOfFileFilters value. |
379 |
380 |
380 Cursor wait showWhile: |
381 Cursor wait showWhile: |
381 [ |
382 [ |
382 (dir := DirectoryContents directoryNamed: directory) notNil ifTrue:[ |
383 (dir := DirectoryContents directoryNamed: directory) notNil ifTrue:[ |
383 dir filesAndBasenamesDo: |
384 "/ dir filesAndBasenamesDo:[:file :name| |
384 [:file :name| |
385 "/ filterList do:[:filter| |
385 list do: |
386 "/ ((filter match:name) and:[(foundFiles includes: name) not]) |
386 [:filter| |
387 "/ ifTrue:[ |
387 ((filter match: name) and: [(foundFiles includes: file) not]) |
388 "/ foundFiles add: name |
388 ifTrue: |
389 "/ ]. |
389 [ |
390 "/ ]. |
390 foundFiles add: file |
391 "/ ]. |
391 ]. |
392 dir filesAndBasenamesDo:[:file :name| |
392 ]. |
393 allFiles add: name |
393 ]. |
394 ]. |
394 self listOfFiles contents: (foundFiles collect: [:file| FileRow new fileName: file]) |
395 filterList do:[:filter| |
|
396 foundFiles addAll:(allFiles select:[:name | filter match:name]). |
|
397 ]. |
|
398 |
|
399 foundFiles := foundFiles asOrderedCollection sort. |
|
400 dir := directory asFilename. |
|
401 self listOfFiles contents: (foundFiles collect:[:name| FileRow new fileName:(dir construct:name)]) |
395 ] |
402 ] |
396 ] |
403 ] |
397 |
404 |
398 "Modified: / 18.5.1998 / 13:02:47 / cg" |
405 "Modified: / 18.5.1998 / 13:02:47 / cg" |
399 ! |
406 ! |