I have implemented a sync and async version of rmTree. See this gist
<http://gist.github.com/443774>. If there is interest I can prepare a
patch for node's fs module.
Best Fabian
> --
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en.
>
--
Aaron
http://clickdummy.net
If you've installed npm, you can get at it this way:
var rm = require("npm/utils/rm-rf")
but of course, you probably want to just bundle it in your own app, so
you don't depend on npm unnecessarily.
--i
Because there is no syscall for a recursive delete. After 0.2 i may
add some convenience functions like this.
Because there is no syscall for a recursive delete. After 0.2 i may
add some convenience functions like this.
What about adding a flag to rmdir, which toggles whether delete is recursive.
rmdir = function(path, recursive, callback)
I think this makes sense but it will break the API and the one to one
mapping to the posix system calls. The other solution would be to add
a fs.rm function, which acts similar to the unix "rm" command. Would
you accept a patch for any of those?
Best Fabian