Documentation for method resolve

Documentation for method resolve, assembled from the following types:

class IO::Path

From IO::Path

(IO::Path) method resolve

method resolve(IO::Path:D: :$completely --> IO::Path)

Returns a new IO::Path object with all symbolic links and references to the parent directory (..) resolved. This means that the filesystem is examined for each directory in the path, and any symlinks found are followed.

# bar is a symlink pointing to "/baz" 
my $io = "foo/./bar/..".IO.resolve;      # now "/" (the parent of "/baz") 

If :$completely, which defaults to False, is set to a true value, the method will fail if it cannot completely resolve the path, otherwise, it will resolve as much as possible, and will merely perform cleanup of the rest of the path. The last part of the path does NOT have to exist to :$completely resolve the path.

NOTE: Currently (April 2017) this method doesn't work correctly on all platforms, e.g. Windows, since it assumes POSIX semantics.