[squeak-dev] The Trunk: Files-nice.109.mcz

commits at source.squeak.org commits at source.squeak.org
Sun May 8 12:04:58 UTC 2011


Nicolas Cellier uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-nice.109.mcz

==================== Summary ====================

Name: Files-nice.109
Author: nice
Time: 8 May 2011, 2:04:45.069 pm
UUID: 77d77f84-de4f-4635-b523-06d551dbf720
Ancestors: Files-ul.108

minor refactorings: use #anySatisfy: #allSatisfy: #noneSatisfy: where it simplifies

=============== Diff against Files-ul.108 ===============

Item was changed:
  ----- Method: AcornFileDirectory>>directoryContentsFor: (in category 'private') -----
  directoryContentsFor: fullPath 
  	"Return a collection of directory entries for the files and directories in 
  	the directory with the given path. See primLookupEntryIn:index: for 
  	further details."
  	"FileDirectory default directoryContentsFor: ''"
  
  	| entries extraPath |
  	entries := super directoryContentsFor: fullPath.
  	fullPath isNullPath
  		ifTrue: [
  			"For Acorn we also make sure that at least the parent of the current dir 
  			is added - sometimes this is in a filing system that has not been (or 
  			cannot be) polled for disc root names"
  			extraPath := self class default containingDirectory.
  			"Only add the extra path if we haven't already got the root of the current dir in the list"
+ 			(entries anySatisfy: [:ent | extraPath fullName beginsWith: ent name]) 
+ 				ifFalse: [entries := entries
- 			entries detect: [:ent | extraPath fullName beginsWith: ent name] 
- 				ifNone: [entries := entries
  								copyWith: (DirectoryEntryDirectory
  										directory: self
  										name: extraPath fullName
  										creationTime: 0
  										modificationTime: 0
  										fileSize: 0)]].
  	^ entries
  !




More information about the Squeak-dev mailing list