[squeak-dev] Re: FileDirectory from a relative path
Andreas Raab
andreas.raab at gmx.de
Thu Sep 17 05:27:16 UTC 2009
Miguel Enrique Cobá Martinez wrote:
> El mié, 16-09-2009 a las 20:51 -0700, Andreas Raab escribió:
>> Try this:
>>
>> (FileDirectory default uri resolveRelativeURI: '../backup') path.
>
> Thanks Andreas, but this line outputs a string with the resolved
> absolute path. That is ok but not what I need. I need a FileDirectory
> object built from a string containing a relative unix path. Without the
> path message I got a HierarchicalURI that inherits from URI that
> inherits from Object.
I thought the answer to that part of the question was obvious, since you
had included it in your own message. Just prepend a "FileDirectory on:"
before the above, i.e.,
FileDirectory on:
(FileDirectory default uri resolveRelativeURI: '../backup') path.
This will answer the FileDirectory for the path you've constructed.
Cheers,
- Andreas
> I am trying to use a method that uses a FileDirectory as parameter and I
> want to use a relative path, but the line I ended with it looked very
> verbose for something so simple.
>
> Thanks anyway.
>
>> Cheers,
>> - Andreas
>>
>> Miguel Enrique Cobá Martinez wrote:
>>> Is this the way to obtain a FileDirectory from a relative path on squeak
>>> on linux:
>>>
>>> FileDirectory on: (FileDirectory default fullNameFor: '../backup/')
>>>
>>> Thanks
>>
More information about the Squeak-dev
mailing list
|