scala-pathy
scala-pathy copied to clipboard
Path for URI
I want to use pathy for the path part in the URI. currently I only have access to
def currentDir[S]: Path[Rel, Dir, S] = Current
def rootDir[S]: Path[Abs, Dir, S] = Root
something like:
def current[T, S]: Path[Rel, T, S] = Current
def root[T, S]: Path[Abs, T, S] = Root
would be useful.
I don’t understand – Current and Root always need to be directories. What does the second version buy you?
Uri has a notion of Path and it's not really bound to Directories or Files: https://tools.ietf.org/html/rfc3986#section-3.3
In http4s Path is not really well typed: https://github.com/http4s/http4s/blob/14d9f28babc5a4205132fd2e7fbab161125e3469/core/src/main/scala/org/http4s/Uri.scala#L141