Open silverwind opened 10 years ago
Interesting, this seems like it would be useful - would be open to a pull request, but at the moment I'm unable to attend to this.
(I'm aware this is 2 months old; lot of things taking up my time at the moment, sadly. Sorry!)
Alright, will send a PR shortly.
Actually, I'll try the new release first as https://github.com/ryanmcgrath/wrench-js/pull/73 looks promising to fix the Windows issues I'm having.
Cool! Definitely let me know if it works for you.
Nope, I was still hitting an ENOTEMPTY pretty fast when running rmdirSyncRecursive on a mozilla-central source tree (250k files), while graceful-fs deleted it without a hitch.
I'll test some more before submitting the PR, just out of curiosity which part of graceful-fs is actually solving these errors.
Also to note, this module would bump your min version of node to 0.4.0.
I haven't found time to dissect graceful-fs yet, but I think the issue is corrected somewhere in polyfills.js.
I've submitted the PR now as-is. I don't think the switch would cause any issues, but just to be save, I'd suggest bumping the minor version.
Hey, I'm regulary running into issues with EACCES / ENOENT when recursively removing directories containing thousands of files with
wrench.rmdirSyncRecursive
on a Windows server.Now I'm wondering if you would consider using graceful-fs, which is a drop-in replacement for node's fs module and seems to solve a lot of issues I had with locked files on Windows.
I can send a PR if you like.