1.0.0 • Published 5 years ago

fs-force-delete-win v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

force-delete

force delete files or directories blocked by other process in Windows

PS: Only works in 32 and 64 bit Windows from XP

Install

npm i fs-force-delete-win --save

Example

const forceDelete = require('fs-force-delete')

forceDelete('C:\\git\\testFilePath')

API

NameTypeDefaultDescription
deletePath{string}the path to a file, a folder or a leading part of the path. E.g. K:, C:\Program Files, C:\Docume. /unlock or -u - unlocks the file_or_folder_path. It closes all handles to the files\folder that starts from file_or_folder_path and unloads .dlls which are residing in the files\folder that starts from file_or_folder_path.
option{object}{}option
kill{boolean}falseterminates all the apps which are launched from path.
staticPath{string}undefinedpath to this package's /static, use this when using webpack in electron.

Known Issue

  1. When using without UAC, it will request UAC by GUI. If you refuse the UAC request, It still get delete success
  2. When using without UAC, it will request UAC by GUI. If you grant the UAC request, It will return before the file is deleted. It will take about 1-2 second.