(path: string)
| 134 | |
| 135 | // Folder operations |
| 136 | ensureFolderExists(path: string): void { |
| 137 | if (!path) return; |
| 138 | |
| 139 | const normalizedPath = this.normalizePath(path); |
| 140 | if (this.folders.has(normalizedPath)) return; |
| 141 | |
| 142 | const parentPath = this.getParentPath(normalizedPath); |
| 143 | if (parentPath) { |
| 144 | this.ensureFolderExists(parentPath); |
| 145 | } |
| 146 | |
| 147 | const folder: MockFolder = { |
| 148 | path: normalizedPath, |
| 149 | name: this.getFileName(normalizedPath), |
| 150 | children: new Map(), |
| 151 | }; |
| 152 | |
| 153 | this.folders.set(normalizedPath, folder); |
| 154 | } |
| 155 | |
| 156 | // Path utilities |
| 157 | private normalizePath(path: string): string { |
no test coverage detected