[Gambas-user] relative path
Charlie Reinl
Karl.Reinl at ...9...
Sun Nov 15 17:05:00 CET 2009
Am Sonntag, den 15.11.2009, 15:40 +0100 schrieb Stefano Palmeri:
> Il domenica 15 novembre 2009 12:42:17 Charlie Reinl ha scritto:
> > Salut,
> >
> > I looking for a function or switch in gambas,
> > which gives me the path-string as relative path
> > and not the whole path up from /
>
> I'm not sure I understood. Do you mean
>
> PRINT File.BaseName("/home/user/mydocuments")
>
> --> mydocuments
>
> ?
>
> Stefano
Salut,
I mean "/home/user/myNiceProject/allOtherFiles/ThisDoc.txt"
to make "allOtherFiles/ThisDoc.txt"
or "/home/user/mydocuments/allOtherFiles/ThisDoc.txt"
out of "/home/user/myNiceProject" to make
"../mydocuments/allOtherFiles/ThisDoc.txt"
Hope that's clearer now!
Even the "/home/user" replaced by "~" could be.
But in a format, that all other functions which need a file as argument
can handle it.
--
Amicalment
Charlie
More information about the User
mailing list