| hide_title | true |
|---|---|
| custom_edit_url | |
| pagination_prev | |
| pagination_next |
Home > @rushstack/node-core-library > FileSystem > deleteFile
Deletes a file. Can optionally throw if the file doesn't exist. Behind the scenes it uses fs.unlinkSync()<></>.
Signature:
static deleteFile(filePath: string, options?: IFileSystemDeleteFileOptions): void;|
Parameter |
Type |
Description |
|---|---|---|
|
filePath |
string |
The absolute or relative path to the file that should be deleted. |
|
options |
(Optional) Optional settings that can change the behavior. Type: |
Returns:
void