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

commits at source.squeak.org commits at source.squeak.org
Wed Mar 17 22:12:35 UTC 2010

Chris Muller uploaded a new version of Files to project The Trunk:

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

Name: Files-cmm.74
Author: cmm
Time: 16 March 2010, 4:29:50.247 pm
UUID: 77f4bf56-6b3d-429c-a9cd-8663088ad5c1
Ancestors: Files-nice.73

Integrated DirectoryEntry>>'attributes' so that third-party applications can easily extend DirectoryEntry with whatever additional state they need.

=============== Diff against Files-nice.73 ===============

Item was added:
+ ----- Method: DirectoryEntry>>attributeNamed:ifAbsent: (in category 'access') -----
+ attributeNamed: aString ifAbsent: oneArgBlock 
+ 	"Answer the value of attribute named aString.  If no attribute by that name has ever been set, answer oneArgBlock value."
+ 	^ self attributes 
+ 		at: aString
+ 		ifAbsent: oneArgBlock!

Item was added:
+ ----- Method: DirectoryEntry>>attributeNamed:put: (in category 'access') -----
+ attributeNamed: aString put: anObject
+ 	"Set the value of attribute named aString.  This is provided for extension by third-party developers."
+ 	^ self attributes 
+ 		at: aString
+ 		put: anObject!

Item was changed:
  Object subclass: #DirectoryEntry
+ 	instanceVariableNames: 'directory name creationTime modificationTime fileSize attributes'
- 	instanceVariableNames: 'directory name creationTime modificationTime fileSize'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Files-Directories'!
  !DirectoryEntry commentStamp: '<historical>' prior: 0!
  an entry in a directory; a reference to either a file or a directory.!

Item was added:
+ ----- Method: DirectoryEntry>>attributes (in category 'private-initialization') -----
+ attributes
+ 	^ attributes ifNil: [ attributes := Dictionary new ]!

Item was added:
+ ----- Method: DirectoryEntry>>extension (in category 'access') -----
+ extension
+ 	^ FileDirectory extensionFor: self name!

Item was added:
+ ----- Method: DirectoryEntry>>baseName (in category 'access') -----
+ baseName
+ 	^ FileDirectory baseNameFor: self name!

More information about the Squeak-dev mailing list