This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account. | |
Token for proof: | |
[Verifying my OpenPGP key: openpgp4fpr:f52edd4fd06ea79b450b3b455d025469c35594d7] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account. | |
Token for proof: | |
[Verifying my OpenPGP key: openpgp4fpr:f52edd4fd06ea79b450b3b455d025469c35594d7] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs.rmrf = (dir, callback) -> | |
# test if the directory exists. | |
fs.exists dir, (exists) -> | |
# return if the directory already is gone. | |
return callback null unless exists | |
fs.stat dir, (err, stats) -> | |
# return if an error occured. | |
return callback err if err | |
# unlink if it is a file, else continue, the recursive call. | |
return fs.unlink dir, callback unless stats.isDirectory() |