[squeak-dev] The Trunk: Files-eem.200.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jan 17 18:31:35 UTC 2023


Eliot Miranda uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-eem.200.mcz

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

Name: Files-eem.200
Author: eem
Time: 17 January 2023, 10:31:33.209498 am
UUID: 1dfd8514-9340-4a34-bff5-4787bd7b30f9
Ancestors: Files-dtl.199

Have UnixFileDirectory expand ~/ to the home directory.

=============== Diff against Files-dtl.199 ===============

Item was added:
+ ----- Method: FileDirectory class>>getenv: (in category 'platform specific') -----
+ getenv: aByteString
+ 	<primitive: 'primitiveGetenv' module: '' error: ec>
+ 	ec == #'bad argument' ifTrue:
+ 		[aByteString isString ifFalse:
+ 			[^self getenv: aByteString asString]].
+ 	self primitiveFail!

Item was added:
+ ----- Method: UnixFileDirectory>>fullNameFor: (in category 'file name utilities') -----
+ fullNameFor: fileName
+ 	"Override to expand ~/"
+ 
+ 	^fileName ifNotNil:
+ 		[super fullNameFor: ((fileName beginsWith: '~/')
+ 								ifTrue:
+ 									[(self class getenv: 'HOME')
+ 										ifNotNil: [:home| home, fileName allButFirst]
+ 										ifNil: [fileName]]
+ 								ifFalse: [fileName])]!



More information about the Squeak-dev mailing list