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

commits at source.squeak.org commits at source.squeak.org
Fri Jul 22 02:50:57 UTC 2016


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

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

Name: Files-cmm.160
Author: cmm
Time: 21 July 2016, 9:50:48.903412 pm
UUID: 39b8ccca-fb51-40b1-9967-44ed1dbb2648
Ancestors: Files-cmm.159

Enable DirectoryEntry's with directory-tree enumeration and content stream access.

=============== Diff against Files-cmm.159 ===============

Item was added:
+ ----- Method: DirectoryEntry>>directoryTreeDo: (in category 'enumeration') -----
+ directoryTreeDo: oneArgBlock
+ 	self subclassResponsibility!

Item was added:
+ ----- Method: DirectoryEntryDirectory>>directoryTreeDo: (in category 'enumeration') -----
+ directoryTreeDo: oneArgBlock
+ 	self asFileDirectory directoryTreeDo: oneArgBlock!

Item was changed:
+ ----- Method: DirectoryEntryFile>>contentsFrom:to: (in category 'contents') -----
- ----- Method: DirectoryEntryFile>>contentsFrom:to: (in category 'stream access') -----
  contentsFrom: startPosition to: endPosition 
  	"Answer my contents from startPosition to endPosition."
  	^ FileStream 
  		detectFile: self readStream
  		do: 
  			[ : stream | 
  			stream
  				position: startPosition ;
  				next: endPosition - startPosition + 1 ]!

Item was changed:
+ ----- Method: DirectoryEntryFile>>contentsTo: (in category 'contents') -----
- ----- Method: DirectoryEntryFile>>contentsTo: (in category 'stream access') -----
  contentsTo: endPosition 
  	"Answer my contents up to endPosition."
  	^ self 
  		contentsFrom: 0
  		to: endPosition!

Item was added:
+ ----- Method: DirectoryEntryFile>>directoryTreeDo: (in category 'enumeration') -----
+ directoryTreeDo: oneArgBlock
+ 	oneArgBlock value: (OrderedCollection with: self)!

Item was added:
+ ----- Method: DirectoryEntryFile>>readStreamDo: (in category 'stream access') -----
+ readStreamDo: aBlock 
+ 	"Open a read stream on my contents and answer the value of aBlock with it, ensuring the stream is closed."
+ 	^ FileStream
+ 		detectFile: self readStream
+ 		do: aBlock!

Item was added:
+ ----- Method: DirectoryEntryFile>>readWriteStreamDo: (in category 'stream access') -----
+ readWriteStreamDo: aBlock 
+ 	"Open a read-write stream on my contents and answer the value of aBlock with it, ensuring the stream is closed."
+ 	^ FileStream
+ 		detectFile: self readWriteStream
+ 		do: aBlock!



More information about the Squeak-dev mailing list