MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / deleteFile

Function deleteFile

apps/webuiapps/src/lib/fileApi.ts:239–249  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

237 * Passes file_paths (array of full paths without leading slash)
238 */
239export 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

Callers 1

createAppFileApiFunction · 0.70

Calls 5

getClientComManagerFunction · 0.90
normalizePathFunction · 0.90
tsFunction · 0.85
deleteFilesByPathsMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected