A DESCRIPTION OF THE PROBLEM :
The `Path.toUri()` method is specified to return an absolute URI always. However, sometimes what you want is a relative URI with a relative path that corresponds to the file path, for the purpose of either extracting a path with platform-neutral separators, or for the raw path which is URI-encoded.
There seem to be several not-so-great solutions to this problem, but ideally there would just be a way to acquire a relative URI directly from the `Path`. Either via `toRelativeUri()` default method on `URI`, or maybe a static method on `Path` or `Paths`. Note that absolute paths can yield a relative URI with an absolute path component as a relative URI is defined merely as one with no scheme component.
The `Path.toUri()` method is specified to return an absolute URI always. However, sometimes what you want is a relative URI with a relative path that corresponds to the file path, for the purpose of either extracting a path with platform-neutral separators, or for the raw path which is URI-encoded.
There seem to be several not-so-great solutions to this problem, but ideally there would just be a way to acquire a relative URI directly from the `Path`. Either via `toRelativeUri()` default method on `URI`, or maybe a static method on `Path` or `Paths`. Note that absolute paths can yield a relative URI with an absolute path component as a relative URI is defined merely as one with no scheme component.