Skip to content

Latest commit

 

History

History
76 lines (39 loc) · 1.2 KB

File metadata and controls

76 lines (39 loc) · 1.2 KB
hide_title true
custom_edit_url
pagination_prev
pagination_next

Home > @rushstack/node-core-library > FileSystem > deleteFile

FileSystem.deleteFile() method

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;

Parameters

Parameter

Type

Description

filePath

string

The absolute or relative path to the file that should be deleted.

options

IFileSystemDeleteFileOptions

(Optional) Optional settings that can change the behavior. Type: IDeleteFileOptions

Returns:

void