[Pkg] Rio: File-Kernel-kph.22.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Thu Jul 16 20:55:40 UTC 2009


A new version of File-Kernel was added to project Rio:
http://www.squeaksource.com/Rio/File-Kernel-kph.22.mcz

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

Name: File-Kernel-kph.22
Author: kph
Time: 16 July 2009, 9:55:35 pm
UUID: 985cfdc0-5eca-457d-b21f-23618d3207a9
Ancestors: File-Kernel-kph.20, File-Kernel-kph.21

Lets go back to a working version eh!

=============== Diff against File-Kernel-kph.20 ===============

Item was changed:
  FileExecutive subclass: #FileLocalExecutive
  	instanceVariableNames: 'rootString root'
+ 	classVariableNames: 'Dynamic Local'
- 	classVariableNames: 'Local Dynamic'
  	poolDictionaries: ''
  	category: 'File-Kernel'!
  
  !FileLocalExecutive commentStamp: 'kph 4/17/2007 19:25' prior: 0!
  Introducing the idea that Rio's exist in the context of their 'physical container', we have the RioLocalFileSystem as the primary container which provides the file system interface, also known as the 'executive'.
  
  On unix there is one executive for the whole system. On dos there is one executive per volume. This approach also supports the notion of files within archives and files on remote servers.
  
  On startup, having a formal model of the host filesystem allows us to keep a current and previous instance introducing the possibility for migrating Rio's on startup when the image has been moved. For example C:/ could be replaced with /mnt/hda1 thus attempting to make images properly portable. (experimental idea)
  
  !

Item was added:
+ ----- Method: FileKernel class>>classForPathWithExtension: (in category 'as yet unclassified') -----
+ classForPathWithExtension: aPath
+ 
+ 	^ self!

Item was changed:
  ----- Method: FileLocalExecutive>>startAt:recursively:select:excluding:into: (in category 'executive actions') -----
  startAt: aDir recursively: beRecursive select: selectBlock excluding: xList into: results 
  
  	"Return a collection of rio's selected by passing
  	the directoryEntry array to the selectBlock.
  	
  	The KernelRio implemetation of setStatFromEntryArray: 
  	does not populate these rios with stat data.
  	Rio's more verbose implementation does.
  
  	This can be called with startAt: aString, but if so beRecursive must be false.
  		
  	See primLookupEntryIn:index: for further details."
  
  	| index entryArray entry isDir fName |
  
  	index := 1.
  
  	[ (entryArray := self primLookupEntryIn: aDir asVmPathName index: index) notNil ] 
  		whileTrue: [
  			#badDirectoryPath = entryArray ifTrue: [
  				^ results "(InvalidDirectoryError pathName: aDir value) signal" ].
  
  				isDir := entryArray at: 4.
  				fName := entryArray at: 1.
+ 
- 				
  				(xList includes: fName) ifFalse: [ 
+ 					entry := ((isDir ifTrue: [ self class dirClass ] 
+ 									ifFalse: [ self class fileClass classForPathWithExtension: fName ]) 
- 					entry := ((isDir ifTrue: [ self class dirClass ] ifFalse: [ self class fileClass ]) 
  						executive: self value: aDir asString) 
  							pathJoin: fName;
  							setStatFromDir: aDir andEntryArray:entryArray;
  							yourself.
  					
  					(selectBlock value: entry) ifTrue: [ results add: entry ].	
  						
  					(beRecursive and: [ isDir ]) 
  						ifTrue: [ 
  							self 
  								startAt: entry
  								recursively: beRecursive 
  								select: selectBlock
  								excluding: xList
  								into: results   
  						].	
  				].
  			index := index + 1
  		].
  	
  	^ results!



More information about the Packages mailing list