[Pkg] Rio: File-Base-mtf.32.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Wed Jul 8 01:31:59 UTC 2009


A new version of File-Base was added to project Rio:
http://www.squeaksource.com/Rio/File-Base-mtf.32.mcz

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

Name: File-Base-mtf.32
Author: mtf
Time: 7 July 2009, 9:05:30 pm
UUID: e54a06e0-3784-49aa-bf86-9e7ece88c87f
Ancestors: File-Base-mtf.31

created File >> addTimeStamp, to easily uniquify a filename with a timestamp

=============== Diff against File-Base-mtf.31 ===============

Item was changed:
  ----- Method: File class>>tmp (in category 'as yet unclassified') -----
  tmp
  
+ 	^ (Directory tmp / (SystemVersion current majorMinorVersion asString)) asFile addTimeStamp!
- 	^ (Directory tmp / (SystemVersion current majorMinorVersion asString , '-', DateAndTime now forFileName)) asFile!

Item was added:
+ ----- Method: File>>addTimeStamp (in category 'copying instanciation') -----
+ addTimeStamp
+ 	"Answer a new file that is myself named with a new unique timestamp"
+ 	"(File new: 'SqueakDebug.log') addTimeStamp"
+ 
+ 	| newFile |
+ 	newFile := self copy splitToBaseVersionStringAndExt: [:base :version :extension |
+ 		self basicBase: (String streamContents: [:stream |
+ 				stream nextPutAll: base; nextPut: $-.
+ 				DateAndTime now printForFileNameOn: stream])
+ 			version: nil ext: extension].
+ 	^ newFile nextVersion!



More information about the Packages mailing list