MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / tryDeleteFile

Function tryDeleteFile

src/shared/utils/fs.ts:455–463  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

453}
454
455export function tryDeleteFile(filePath: string) {
456 if (fs.existsSync(filePath)) {
457 try {
458 fs.unlinkSync(filePath);
459 } catch (e: any) {
460 console.warn(`Failed to delete file ${filePath}: ${e}`);
461 }
462 }
463}
464
465export function getRandomInt(min: number, max: number) {
466 min = Math.ceil(min);

Callers 1

getFlutterSnippetsFunction · 0.90

Calls 1

warnMethod · 0.65

Tested by

no test coverage detected