(parts: {
folderPath?: string | null
name: string
prefix?: 'files' | 'recently-deleted/files'
})
| 49 | } |
| 50 | |
| 51 | export function canonicalWorkspaceFilePath(parts: { |
| 52 | folderPath?: string | null |
| 53 | name: string |
| 54 | prefix?: 'files' | 'recently-deleted/files' |
| 55 | }): string { |
| 56 | const prefix = parts.prefix ?? 'files' |
| 57 | const folderSegments = parts.folderPath ? parts.folderPath.split('/').filter(Boolean) : [] |
| 58 | const encoded = encodeVfsPathSegments([...folderSegments, parts.name]) |
| 59 | return `${prefix}/${encoded}` |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Build a map from folderId to its canonical, per-segment-encoded VFS folder |
no test coverage detected