Relative path

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Relative path

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Relative path

jannik laval
Hi Hilaire,

You what is the Platform clipartsPath ?

I am thinking that what you need is :
FileSystem workingDirectory / 'fruits' / 'apples.png’

something like that.

Jannik


On Jan 17, 2014, at 10:06 PM, Hilaire Fernandes <[hidden email]> wrote:

> Hello
>
> I want to send a message with a relative path as argument:
>
> self getClipart: 'fruits' / 'apples.png'
>
> It should look like that but it does not work of course.
>
>
> Then from getClipart method, it should be something like:
>
> getClipart: relativePath
>
> file := Platform clipartsPath / relativePath
>
>
> I don't understand how to do it.
>
>
> Thanks
>
> Hilaire
>
> --
> Dr. Geo http://drgeo.eu
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Relative path

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Relative path

Nicolai Hess
2014/1/17 Hilaire Fernandes <[hidden email]>
Le 17/01/2014 22:13, jannik.laval a écrit :
> You what is the Platform clipartsPath ?

It is something like
 FileSystem disk workingDirectory parent / 'Cliparts

> I am thinking that what you need is :
> FileSystem workingDirectory / 'fruits' / 'apples.png’

Yes but no, I want  'fruits' / 'apples.png’ to be defined in another
methods like, in a clean way:

getApple
self getClipart: 'fruits' / 'apples.png’




--
Dr. Geo http://drgeo.eu



hi,

you can create a relative path with
Path class>>*

p:=Path * 'fruits'  / 'apples.png'.

If you want to create an absolute path or the full filename you need
a FileReference for that directory and call #resolve:
(for example wit hth current directory)
FileSystem workingDirectory resolve:p


regards

Nicolai Hess

Reply | Threaded
Open this post in threaded view
|

Re: Relative path

hilaire
CONTENTS DELETED
The author has deleted this message.