MCPcopy Create free account
hub / github.com/3dugc/3D-Model-Optimizer / deleteTaskFiles

Method deleteTaskFiles

src/utils/storage.ts:278–283  ·  view source on GitHub ↗

* Deletes all files associated with a task * * @param taskId - The task identifier * @returns Object indicating which files were deleted

(taskId: string)

Source from the content-addressed store, hash-verified

276 * @returns Object indicating which files were deleted
277 */
278 async deleteTaskFiles(taskId: string): Promise<{ uploadDeleted: boolean; resultDeleted: boolean }> {
279 const uploadDeleted = await this.deleteFileIfExists(this.getUploadedFilePath(taskId));
280 const resultDeleted = await this.deleteFileIfExists(this.getResultFilePath(taskId));
281 await this.deleteFileIfExists(this.getResultMetadataPath(taskId));
282 return { uploadDeleted, resultDeleted };
283 }
284
285 /**
286 * Cleans up files older than the specified age

Callers 2

deleteTaskFilesFunction · 0.80
storage.test.tsFile · 0.80

Calls 4

deleteFileIfExistsMethod · 0.95
getUploadedFilePathMethod · 0.95
getResultFilePathMethod · 0.95
getResultMetadataPathMethod · 0.95

Tested by

no test coverage detected