[squeak-dev] The Trunk: Files-cmm.100.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Feb 23 17:03:27 UTC 2011


Chris Muller uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-cmm.100.mcz

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

Name: Files-cmm.100
Author: cmm
Time: 23 February 2011, 11:03:18.483 am
UUID: d88b3b47-ca8c-4a6a-8ad4-b7ba0f1ceba7
Ancestors: Files-ul.99

- DirectoryEntry's are very transient objects, so it makes sense for them to override #= and #hash, just like its brother, FileDirectory.
- Also added localized splitNameVersionExtension.

=============== Diff against Files-ul.99 ===============

Item was added:
+ ----- Method: DirectoryEntry>>= (in category 'testing') -----
+ = aDirectoryEntry 
+ 	"Answer whether I am equivalent in all of my file-system attributes."
+ 	^ self containingDirectory = aDirectoryEntry containingDirectory
+ 		and: [self name = aDirectoryEntry name
+ 				and: [self modificationTime = aDirectoryEntry modificationTime
+ 						and: [self fileSize = aDirectoryEntry fileSize]]]!

Item was added:
+ ----- Method: DirectoryEntry>>exists (in category 'testing') -----
+ exists
+ 	^ (self containingDirectory
+ 		entryAt: self name
+ 		ifAbsent: [ nil ]) notNil!

Item was added:
+ ----- Method: DirectoryEntry>>hash (in category 'testing') -----
+ hash
+ 	"Hashing on directory + name should be sufficient."
+ 	^ (self containingDirectory hash hashMultiply + self name hash) hashMultiply!

Item was added:
+ ----- Method: DirectoryEntry>>splitNameVersionExtension (in category 'access') -----
+ splitNameVersionExtension
+ 	" answer an array with the root name, version # and extension."
+ 	^ self directory splitNameVersionExtensionFor: self name!




More information about the Squeak-dev mailing list