Old Mac OS and relative pathnames?
Raymond
raymondasselin at sympatico.ca
Wed Nov 13 21:48:18 UTC 2002
Le 2002/11/12 à 22:37, Ned Konz <ned at bike-nomad.com> écrivait:
>On Tuesday 12 November 2002 09:30 pm, Masato Sumi wrote:
>
>> When xxx is one of the volume names, 'xxx:yyy' should be recognized
>> as full path name. But not, that should be ... Ok, I wrote down
>> my opinion as Smalltalk code that be attached.
>
>Thank you.
>
>Now this works better:
>
>d := FileDirectory default.
>fullName := d fullPathFor: ':xxx:yyy:zzz'.
>fullDir := FileDirectory forFileName: fullName.
>fullDir assureExistence.
>
>but this still does not work:
>
>(FileDirectory on: ':xxx:yyy:zzz') assureExistence.
>
>So I changed FileDirectory>>on: to read like this:
>
>----
>on: pathString
> "Return a new file directory for the given path, of the appropriate
>FileDirectory subclass for the current OS platform."
>
> | pathName |
> DirectoryClass ifNil: [DirectoryClass _ self activeDirectoryClass].
> "If path ends with a delimiter (: or /) then remove it"
> ((pathName _ pathString) endsWith: self pathNameDelimiter asString)
>ifTrue: [
> pathName _ pathName copyFrom: 1 to: pathName size - 1].
> ^ DirectoryClass new setPathName: (self default fullNameFor:
>pathName)
>----
>
>However, when I tried the example again:
>
>(FileDirectory on: ':xxx:yyy:zzz') assureExistence.
>
>Squeak died with "an error of type 2". I assume that means that
>there's a problem somewhere; the Mac won't tell me what "an error of
>type 2" actually is.
>
>What's going on here?
Hi Ned, I¹m far from an expert and may be what I will tell you is to be trash but with old mac
it was necessary that the first level (root is the name I think ?) be ::xxx:yyy:zzz¹, a double colon...
More information about the Squeak-dev
mailing list
|