(id: string)
| 234 | } |
| 235 | |
| 236 | export function fsPathFromId(id: string): string { |
| 237 | const fsPath = normalizePath( |
| 238 | id.startsWith(FS_PREFIX) ? id.slice(FS_PREFIX.length) : id, |
| 239 | ) |
| 240 | return fsPath[0] === '/' || VOLUME_RE.test(fsPath) ? fsPath : `/${fsPath}` |
| 241 | } |
| 242 | |
| 243 | export function fsPathFromUrl(url: string): string { |
| 244 | return fsPathFromId(cleanUrl(url)) |
no test coverage detected