wip
This commit is contained in:
parent
cc89f0c75c
commit
afd28d934e
26 changed files with 2103 additions and 427 deletions
10
data-pipeline/utils/delete-file.ts
Normal file
10
data-pipeline/utils/delete-file.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import fs from "fs";
|
||||
|
||||
/**
|
||||
* Deletes a file if it exists. Silently ignores missing files.
|
||||
*/
|
||||
export function deleteFileIfExists(filePath: string): void {
|
||||
if (fs.existsSync(filePath)) {
|
||||
fs.unlinkSync(filePath);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue