A new version of File-Kernel was added to project Rio: http://www.squeaksource.com/Rio/File-Kernel-jrd.26.mcz
==================== Summary ====================
Name: File-Kernel-jrd.26 Author: jrd Time: 2 May 2009, 6:41:04 pm UUID: a1e91f90-4541-4f68-9903-e4eaba70a979 Ancestors: File-Kernel-jrd.25
Changed:
- Added an executive for MacOS X. implements the homePath and data path as well as a mechanism to get the value of an environment variable.
=============== Diff against File-Kernel-jrd.25 ===============
Item was changed: ----- Method: FileUnixExecutive>>primEnvironmentAtSymbol: (in category 'as yet unclassified') ----- primEnvironmentAtSymbol: aSymbol + + ^self class primEnvironmentAtSymbol: aSymbol! - "Answer the value of an environment variable in the external OS process." - - <primitive: 'primitiveEnvironmentAtSymbol' module: 'UnixOSProcessPlugin'> - ^ nil !
Item was added: + ----- Method: FileMacOSXExecutive>>homePath (in category 'as yet unclassified') ----- + homePath + ^ self environmentAt: #HOME ifAbsent: [^super home]!
Item was added: + ----- Method: FileMacOSXExecutive>>dataPath (in category 'as yet unclassified') ----- + dataPath + ^ self homePath , '/Library/Application Support/Squeak/'!
Item was added: + ----- Method: FileMacOSXExecutive class>>getenv: (in category 'as yet unclassified') ----- + getenv: varString + " self getenv: 'HOME' " + " self getenv: 'ZYZZYX' " + + <cdecl: char* 'getenv' ( char* ) module: 'libc.dylib'> + ^self externalCallFailed!
Item was added: + FileLocalCaseInsensitiveExecutive subclass: #FileMacOSXExecutive + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'File-Kernel'!
Item was added: + ----- Method: FileUnixExecutive class>>primEnvironmentAtSymbol: (in category 'as yet unclassified') ----- + primEnvironmentAtSymbol: aSymbol + "Answer the value of an environment variable in the external OS process." + "self primEnvironmentAtSymbol: #HOME" + + <primitive: 'primitiveEnvironmentAtSymbol' module: 'UnixOSProcessPlugin'> + ^ nil !
Item was added: + ----- Method: FileMacOSXExecutive>>environmentAt:ifAbsent: (in category 'as yet unclassified') ----- + environmentAt: aSymbol ifAbsent: block + + | v | + v := self class getenv: aSymbol asString. + v ifNil: [^block value]. + ^v!
Item was changed: ----- Method: FileLocalExecutive class>>newForMacOS (in category 'image start up ') ----- newForMacOS
+ ^ FileMacOSXExecutive new! - ^ FileLocalCaseInsensitiveExecutive new!
packages@lists.squeakfoundation.org