The Wayback Machine - https://web.archive.org/web/20201009190422/https://github.com/hezedu/fuckwinfsdel
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

fuck win fs del

No matter how deep the directory, It can be async's delete all. image

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

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

//or 

del('./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){

  });

About

Solve Windows can't delete long paths file's bug.

Topics

Resources

License

Packages

No packages published
You can’t perform that action at this time.