[ENH] UnixFileDirectory tweak
Joshua Gargus
gargus at cs.ualberta.ca
Wed Dec 15 23:32:16 UTC 1999
--EeQfGwPcQSOJBaQU
Content-Type: text/plain; charset=us-ascii
While playing around with Alice, I became annoyed that I had to
type in the full pathname to model files, when 'alice/Vehicles/model.mdl'
would be sufficient to find the file from the directory with my image.
The following changeset allows the use of relative pathnames. I have
included it in the body of the message, as well as as an attachment.
Josh
---------------------------------------------------------------
'From Squeak2.7alpha of 8 December 1999 [latest update: #1716] on 15 December 1999 at 5:23:53 pm'!
"Change Set: UnixFileDirectory-tweak
Date: 15 December 1999
Author: Joshua Gargus
Attempts to interpret non-empty path names that don't begin with the directory delimitor as
relative path names."!
!UnixFileDirectory methodsFor: 'private' stamp: 'jcg 12/15/1999 17:19'!
setPathName: pathString
"Unix path names start with a leading delimiter character."
pathString isEmpty
ifTrue: [pathName _ self pathNameDelimiter asString]
ifFalse: [pathString first == self pathNameDelimiter
ifTrue: [pathName _ pathString]
ifFalse: ["treat 'pathString' as a relative path name"
pathName _
self class default pathName ,
self pathNameDelimiter asString ,
pathString]]! !
--EeQfGwPcQSOJBaQU
Content-Type: text/plain; name="UnixFileDirectory-tweak.1.cs"
; x-mac-type="54455854"
; x-mac-creator="522A6368"
Content-Disposition: attachment; filename="UnixFileDirectory-tweak.1.cs"
Content-Transfer-Encoding: imap_stub
0,2403,2,809,0,
--EeQfGwPcQSOJBaQU--
More information about the Squeak-dev
mailing list
|