DirectoryView.st
changeset 828 12090f74be53
parent 823 47e7d348e01a
child 874 ab93fcd829c5
equal deleted inserted replaced
827:aa8f49da0f22 828:12090f74be53
   368 
   368 
   369 !DirectoryView methodsFor:'private'!
   369 !DirectoryView methodsFor:'private'!
   370 
   370 
   371 readDirectory
   371 readDirectory
   372 
   372 
   373     |foundFiles list|    
   373     |foundFiles list dir|    
       
   374 
   374     foundFiles := OrderedCollection new.
   375     foundFiles := OrderedCollection new.
   375     list := self listOfFileFilters value.
   376     list := self listOfFileFilters value.
   376 
   377 
   377     Cursor wait showWhile: 
   378     Cursor wait showWhile: 
   378     [ 
   379     [ 
   379         (DirectoryContents directoryNamed: directory) filesAndBasenamesDo: 
   380         (dir := DirectoryContents directoryNamed: directory) notNil ifTrue:[
   380         [:file :name|      
   381             dir filesAndBasenamesDo:
   381             list do:
   382             [:file :name|      
   382             [:filter|
   383                 list do:
   383                 ((filter match: name) and: [(foundFiles includes: file) not])
   384                 [:filter|
   384                 ifTrue:
   385                     ((filter match: name) and: [(foundFiles includes: file) not])
   385                 [
   386                     ifTrue:
   386                     foundFiles add: file
   387                     [
       
   388                         foundFiles add: file
       
   389                     ].
   387                 ].
   390                 ].
   388             ].
   391             ].
   389         ].
   392             self listOfFiles contents: (foundFiles collect: [:file| FileRow new fileName: file])
   390         self listOfFiles contents: (foundFiles collect: [:file| FileRow new fileName: file])
   393         ]
   391     ]
   394     ]
   392 
   395 
       
   396     "Modified: / 18.5.1998 / 13:02:47 / cg"
   393 !
   397 !
   394 
   398 
   395 readMonitoringDirectory
   399 readMonitoringDirectory
   396 
   400 
   397     |readBlock|
   401     |readBlock|