https://github.com/hezedu/fuckwinfsdel
Solve Windows can't delete long paths file's bug.
https://github.com/hezedu/fuckwinfsdel
cli delete file long nodejs windows
Last synced: 6 days ago
JSON representation
Solve Windows can't delete long paths file's bug.
- Host: GitHub
- URL: https://github.com/hezedu/fuckwinfsdel
- Owner: hezedu
- License: mit
- Created: 2015-10-14T05:11:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-06-12T00:27:16.000Z (about 2 years ago)
- Last Synced: 2024-11-08T10:31:56.289Z (7 months ago)
- Topics: cli, delete, file, long, nodejs, windows
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 27
- Watchers: 6
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fuck win fs del
No matter how deep the directory, It can be async's delete all.
For Windows developers. Aslo Can be used Linux, Mac.
### install
CLI(global):`npm install fuckwinfsdel -g`or
API(local)`npm install fuckwinfsdel`
## use(CLI)
`fuckwinfsdel youdir`### example
`fuckwinfsdel node_modules`
Will delete current directory's node_modules folder.`fuckwinfsdel D:\expressgit\node_modules`
Will delete D:\expressgit\node_modules folder.## API
### fuckwinfsdel(dir, callback)
### fuckwinfsdel(dir, opts, callback)### example
```js
var del = require('fuckwinfsdel');del('./dist', function(err, result){
if(err){
return console.log(err);
}
console.log('end', result);
/*
result:
errCount: error count
deep: files' deep
*/
});
```
opts:`process`,`onFail`.
### full state example
```js
//ordel('./dist', {
process : function(count1, count2){
process.stdout.cursorTo(0);
process.stdout.write('\u001b[93m' + count1 + '/' + count2 + '\u001b[39m');
},
onFail: function(method, err){
console.error(method, err);
}
},
function(err, result){});
```