[Pkg] Rio: File-Kernel-mtf.21.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Sat Apr 11 20:32:24 UTC 2009


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

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

Name: File-Kernel-mtf.21
Author: mtf
Time: 11 April 2009, 4:32:19 pm
UUID: 7fc61745-2e55-4f5c-9a56-14c62bd6adca
Ancestors: File-Kernel-kph.20

better classified a bunch of methods in FileExecutive

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

Item was changed:
+ ----- Method: FileExecutive>>touch: (in category 'file actions') -----
- ----- Method: FileExecutive>>touch: (in category 'as yet unclassified') -----
  touch: aRio
  
  	aRio writer use: [:r | ]!

Item was changed:
+ ----- Method: FileExecutive>>root (in category 'useful paths') -----
- ----- Method: FileExecutive>>root (in category 'as yet unclassified') -----
  root
  
  	^ self class dirClass executive: self value: self rootString!

Item was changed:
+ ----- Method: FileExecutive>>homeDirectory (in category 'useful paths') -----
- ----- Method: FileExecutive>>homeDirectory (in category 'as yet unclassified') -----
  homeDirectory
  
  	| |
  	^ self class dirClass executive: self value: home  !

Item was changed:
+ ----- Method: FileExecutive>>isDirectory: (in category 'testing') -----
- ----- Method: FileExecutive>>isDirectory: (in category 'as yet unclassified') -----
  isDirectory: aRio 
  
  	^ aRio stat ifNil: [ false ] ifNotNil: [ aRio stat isDirectory ]
  !

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 changed:
+ ----- Method: FileExecutive>>delete: (in category 'file actions') -----
- ----- Method: FileExecutive>>delete: (in category 'as yet unclassified') -----
  delete: aFileOrDir
  
  	aFileOrDir isDirectory ifTrue: [ ^ aFileOrDir rmdir ].
  	self deleteFile: aFileOrDir.!

Item was changed:
+ ----- Method: FileExecutive>>fileClass (in category 'constants') -----
- ----- Method: FileExecutive>>fileClass (in category 'as yet unclassified') -----
  fileClass
  
  	^ Smalltalk at: #File ifAbsent: [ FileKernel ]!

Item was changed:
+ ----- Method: FileExecutive>>isRemote (in category 'testing') -----
- ----- Method: FileExecutive>>isRemote (in category 'as yet unclassified') -----
  isRemote
  
  	^ false!

Item was changed:
+ ----- Method: FileExecutive>>setHome: (in category 'useful paths') -----
- ----- Method: FileExecutive>>setHome: (in category 'as yet unclassified') -----
  setHome: d
   
  	"store home directory as a string, otherwise storeOn: is recursive"
  	
  	home := d asString!

Item was changed:
+ ----- Method: FileExecutive>>isLocal (in category 'testing') -----
- ----- Method: FileExecutive>>isLocal (in category 'as yet unclassified') -----
  isLocal
  
  	^ self isRemote not!

Item was changed:
+ ----- Method: FileExecutive>>pathDelimiterChar (in category 'constants') -----
- ----- Method: FileExecutive>>pathDelimiterChar (in category 'case-sensitivity') -----
  pathDelimiterChar
  
  	^ self class pathDelimiter first!

Item was changed:
+ ----- Method: FileExecutive>>isFile: (in category 'testing') -----
- ----- Method: FileExecutive>>isFile: (in category 'as yet unclassified') -----
  isFile: aFileOrDirectory 
  
  	^ (aFileOrDirectory stat ifNil: [ ^ false ]) isFile
  !

Item was changed:
+ ----- Method: FileExecutive>>isFull: (in category 'testing') -----
- ----- Method: FileExecutive>>isFull: (in category 'as yet unclassified') -----
  isFull: aFileOrDirectory
  
  	^ aFileOrDirectory value beginsWith: self rootString!

Item was changed:
+ ----- Method: FileExecutive>>rootString (in category 'useful paths') -----
- ----- Method: FileExecutive>>rootString (in category 'as yet unclassified') -----
  rootString
  
  	^ self subclassResponsibility!

Item was changed:
+ ----- Method: FileExecutive>>arePathsCaseSensitive (in category 'testing') -----
- ----- Method: FileExecutive>>arePathsCaseSensitive (in category 'case-sensitivity') -----
  arePathsCaseSensitive
  
  	^ (self is: $a sameAs: $A) not
  	
  !

Item was changed:
+ ----- Method: FileExecutive>>cleanDir: (in category 'as yet unclassified') -----
- ----- Method: FileExecutive>>cleanDir: (in category 'case-sensitivity') -----
  cleanDir: aDir
  
    File 
  	ospIfWin:[ :os | os waitForCommand: 'cd ', aDir,' && del \s *.*'. ]
  		ifUnix: [ :os | os waitForCommand: 'cd ', aDir,'; rm -rf *' ]
  		ifNone: [  aDir all delete ]
  !

Item was changed:
+ ----- Method: FileExecutive>>currentExecutive (in category 'constants') -----
- ----- Method: FileExecutive>>currentExecutive (in category 'case-sensitivity') -----
  currentExecutive
  
  	"Dont call this, instead call, FileExecutive dynamic currentExecutive"
  	
  	^ self
  	
   !

Item was changed:
+ ----- Method: FileExecutive>>fullFor: (in category 'path conversion') -----
- ----- Method: FileExecutive>>fullFor: (in category 'as yet unclassified') -----
  fullFor: aFileOrDirectory
  
  	"the absolute path of this rio, or if relative 
  	combine with #homeDirectory to obtain the full path"
  	
  	aFileOrDirectory value isEmpty ifTrue: [ ^ self homeDirectory ].
  	
  	(self isFull: aFileOrDirectory) ifTrue: [ ^ aFileOrDirectory ].
  
  	^ aFileOrDirectory newFrom: (home, self class pathDelimiter, aFileOrDirectory value)!

Item was removed:
- ----- Method: FileExecutive>>MCPasswordManager (in category 'case-sensitivity') -----
- MCPasswordManager
- 
- 	^ MCPasswordManager!



More information about the Packages mailing list