Well, in general the outermost one is the desirable one, because I
want to be able to run my server without having to worry about which
directory I’m executing it from. When specifying an asset to load,
paths relative to the script don’t always work, because there are
often multiple entry points into an application.
So the project root provides an anchor for paths within the project
which leaves no ambiguity regarding their location. That’s really the
entire point of keeping a reference to the project root. And as long
as you had a reference to the outermost one, it’s easy enough to use
that to get references to the inner ones anyway.
In my own projects I can construct it myself without worrying about
the most general case, but I maintain a couple of packages which are
intended to work against any application. At least one of these
packages would benefit from having an unambiguous reference to the
root of the project.
Thanks,
Thomas
On 17 September 2014 05:46, 'Bob Nystrom' via Dart Misc
> --
> For other discussions, see
https://groups.google.com/a/dartlang.org/
>
> For HOWTO questions, visit
http://stackoverflow.com/tags/dart
>
> To file a bug report or feature request, go to
http://www.dartbug.com/new
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
misc+uns...@dartlang.org.