Function
_format
(sep: string, pathObject: Partial<Path.Parsed>)
Source from the content-addressed store, hash-verified
| 335 | } |
| 336 | |
| 337 | function _format(sep: string, pathObject: Partial<Path.Parsed>) { |
| 338 | const dir = pathObject.dir || pathObject.root |
| 339 | const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "") |
| 340 | if (!dir) { |
| 341 | return base |
| 342 | } |
| 343 | if (dir === pathObject.root) { |
| 344 | return dir + base |
| 345 | } |
| 346 | return dir + sep + base |
| 347 | } |
| 348 | |
| 349 | function fromFileUrl(url: URL): Effect.Effect<string, BadArgument> { |
| 350 | if (url.protocol !== "file:") { |
Tested by
no test coverage detected