(path: string)
| 237 | * Passes file_paths (array of full paths without leading slash) |
| 238 | */ |
| 239 | export const deleteFile = async (path: string): Promise<void> => { |
| 240 | const manager = getClientComManager(); |
| 241 | const normalized = normalizePath(path); |
| 242 | const filePath = normalized.replace(/^\//, ''); |
| 243 | const startTime = ts(); |
| 244 | const t0 = performance.now(); |
| 245 | await manager.deleteFilesByPaths({ file_paths: [filePath] }); |
| 246 | console.info( |
| 247 | `[FileApi][${startTime}] deleteFile "${filePath}" — ${(performance.now() - t0).toFixed(1)}ms`, |
| 248 | ); |
| 249 | }; |
| 250 | |
| 251 | /** |
| 252 | * Batch delete files |
no test coverage detected