(segment: string)
| 13 | } |
| 14 | |
| 15 | export function encodeVfsSegment(segment: string): string { |
| 16 | const normalized = normalizeDisplaySegment(segment) |
| 17 | if (!normalized || normalized === '.' || normalized === '..') { |
| 18 | throw new VfsPathError('VFS path segment cannot be empty or a dot segment') |
| 19 | } |
| 20 | return encodeURIComponent(normalized) |
| 21 | } |
| 22 | |
| 23 | export function decodeVfsSegment(segment: string): string { |
| 24 | try { |
no test coverage detected