I couldn't find any info regarding this question.
Is there even a way for node.js to send a file / folder to bin instead of fs.unlink / fs.rmdir?
Can you do something like sendToBin(path)
to send a file to recycle bin (Windows) trash (MacOS) instead of running fs.unlink()
to remove file from disk (I know that it just marks it with 0)
Node.js
's fs
doesn't provide any api for moving files to Trash
/Recycle Bin
, but you can try trash node-module to have work-around.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With