Add path package

For testing purposes we need to get the long path of filesystem paths
on Windows machines. By default non-UTF8 syscalls will return the short path
(Ex:"C:\PROGRA~1" instead of "C:\Program Files"). This package exports
previously private functions used in the symlink package to determine the
long path of a file/directory.
On 8 August 2014 18:06, Nate Finch <notifications@github.com> wrote:

> In path/path_windows.go:
>
> > @@ -0,0 +1,43 @@
> > +// Copyright 2014 Canonical Ltd.
> > +// Copyright 2014 Cloudbase Solutions SRL
> > +// Licensed under the LGPLv3, see LICENCE file for details.
> > +
> > +package path
>
> The SamePath checker idea is a good one, it can use os.SameFile under the
> hood, and that looks like it's path-independent, at least on linux and
> windows. It's probably more robust than a simple string check, too.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/juju/utils/pull/20/files#r16003862>.
>
On balance, I think I'd just do the SameFile check in the tests instead of
path
comparison. The problem with SameFile as an implementation of SamePath
is that the paths must exist, which SamePath does not imply.

Perhaps just a SameFile checker would do the job.

That would make me a lot happier :-)