TruePath icon indicating copy to clipboard operation
TruePath copied to clipboard

`LocalPath`: resolve to `AbsolutePath`

Open ForNeVeR opened this issue 10 months ago • 0 comments

We need a function that will take a LocalPath and convert it into an AbsolutePath, by these rules:

  • if the path is already absolute, return as-is (re-wrapping into an AbsolutePath)
    • consider the optimization mentioned in #17
  • if the path is relative, then resolve it relatively to the base directory
    • the base directory may be passed or may be the CWD by default (I would like this variant to be explicit, though, perhaps another overload or even a new name)

ForNeVeR avatar Apr 27 '24 22:04 ForNeVeR