[Gambas-user] Path specification
Me
adamnt42 at gmail.com
Sun Aug 19 19:29:12 CEST 2018
On Sun, 19 Aug 2018 16:51:29 +0200
Benoît Minisini <g4mba5 at gmail.com> wrote:
>
> Sorry, the behaviour is changing in the development version. :-)
>
> "abcd" --> 'abcd' file in the running component or project.
>
> "./abcd" --> 'abcd' file in the running component or project.
>
> "../abcd" --> 'abcd' file in the calling component of the running
> component, or in the current project if there is no calling component.
> The calling component is the component of the first calling function
> that is not in the current running component.
>
> ".../abcd" --> 'abcd' in the current project.
>
> "./gb.xxx/abcd" --> 'abcd' in the 'gb.xxx' component if it is actually
> loaded.
>
> I'm still looking for better syntaxes that are compatible with the old
> ones described in the wiki:
>
> - The problem with './gb.xxx/abcd' is that you can't access a 'gb.xxx'
> directory in your project without using the 'gb.xxx' syntax directly.
>
> - The problem with '.../abcd' is its ugliness.
>
> - And so on...
>
> Regards,
>
> --
> Benoît Minisini
>
./<subpath>/<file.rxt> currently refers to a file in a subdirectory of the current executable
and ../<subpath>/<file.ext> currently refers to a file in the calling executable (with the noted exceptions). I presume the introduction of the "./gb.xxx/abcd" construct will not disturb that?
May I suggest :
..//<subpath>/<file.ext> to refer to the top level executable
and
.///<component>/<file.ext> to refer to a specific i.e. literal, component (or library)
I agree that .../abcd is suboptimal, but for a different reason - too easy to make a typo! (three slashes are much more visible than three dots.)
BTW thanks for the timely information of this change, we make a great deal of use of relative paths to get at the considerable number of metadata files we have at various levels of our components and libraries.
regards
b
--
Me <adamnt42 at gmail.com>
More information about the User
mailing list