README claims trash()
returns a Promise, but the expected type is void
?
Line 4 in bdfbd07
So there is currently no way to tell whether the library succeeded in moving a file into the trash or whether it encountered an error?
trash('some-file.lol')
.then((result) => {
console.log(result); // always `undefined`
})
.catch((err) => {
console.log(err); // never runs
});
So, the library just sends a command to the OS and doesn't know what happens after?
When you tell the library to delete a non-existing file, it behaves the same way (no error, no notification).
This isn't a problem -- it's just that I'd love to have my app respond appropriately, not just assume that deletion occurred correctly π
I can manually get node to check whether the file is present to confirm it was deleted, but would be great if I didn't have to π
Please let me know if I'm misunderstanding something.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too