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

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Thu Apr 23 23:50:14 UTC 2009


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

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

Name: File-Base-mtf.28
Author: mtf
Time: 23 April 2009, 7:50:09 pm
UUID: c13e25f5-d8e7-4ac0-8b26-b9326adf086e
Ancestors: File-Base-mtf.27, File-Base-kph.27

merged keith's and matthew's branches, and added an accessor for the platform's user data file path ("Directory data")

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

Item was changed:
  ----- Method: Directory>>asFile (in category 'directory/container actions') -----
  asFile
  
+ 	^ self as: (File classForPathWithExtension: value) !
- 	^ self as: File!

Item was added:
+ ----- Method: FilePng class>>validExtensions (in category 'as yet unclassified') -----
+ validExtensions
+ 
+ ^ #( 'png' )!

Item was added:
+ ----- Method: Directory class>>data (in category 'as yet unclassified') -----
+ data
+ "The place to put per-user persistent data, such as preferences"
+ 
+ 	^ self localExecutive dataDirectory!

Item was added:
+ ----- Method: FileJpeg class>>validExtensions (in category 'as yet unclassified') -----
+ validExtensions
+ 
+ ^ #( 'jpeg' 'jpg' )!

Item was changed:
  ----- Method: String>>asFile (in category '*file-base') -----
  asFile
  
+ 	^ ((File classForPathWithExtension: self) "ifNil: [ File ]") new: self!
- 	^ ((File classForPathWithExtension: self) ifNil: [ File ]) new: self!

Item was changed:
  ----- Method: File class>>classForPathWithExtension: (in category 'documentation') -----
  classForPathWithExtension: aPath
  
  	| ext |
  	ext := aPath copyAfterLast: $..
  	
  	self allSubclassesDo: [ :c | (c validExtensions includes: ext) ifTrue: [ ^ c ] ].
  		
+ 	^ File
- 	^ nil
   !

Item was added:
+ ----- Method: FileJpeg>>extent (in category 'as yet unclassified') -----
+ extent
+ 
+ 	| ext |
+ 	self beBinary reader: [ :str | 
+ 		
+ 		ext := JPEGReadWriter2 new imageExtent:  (str next: 600)
+ 	].
+ 
+ 	((ext x = 0) and: [ ext y = 0 ]) ifTrue: [ ^ nil ].
+ 	
+ 	^ ext!

Item was changed:
  ----- Method: File class>>/ (in category 'as yet unclassified') -----
  / aPathable
  
  	"we are the local cwd"
  	^ self localExecutive in: [:exec |
+ 			exec class dirClass executive: exec value: aPathable asString
- 			exec dirClass executive: exec value: aPathable asString
  	  ]
  !

Item was added:
+ ----- Method: File>>extent (in category 'public modes') -----
+ extent
+ 	"for compatability with FileJpeg"
+ 	^ nil!

Item was added:
+ File subclass: #FileJpeg
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'File-Base'!

Item was added:
+ File subclass: #FilePng
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'File-Base'!



More information about the Packages mailing list