sindresorhus / macos-trash

Move files and folders to the trash
MIT License
374 stars 14 forks source link

Question: potential error messages #12

Closed JayBrown closed 3 years ago

JayBrown commented 3 years ago

I am using your trash CLI in this set of tools: https://github.com/JayBrown/Trash-Tools

At some point (in the trashes tool) I'm parsing trash output for error strings. So far I've encountered "volume doesn't have a trash" and "no permissions to trash file".

It seems that these error message come directly from the macOS system. Do you know if there's an info document somewhere that lists all possible stderr messages of the system's move-to-trash routine?

sindresorhus commented 3 years ago

Apple, unfortunately, doesn't document the possible errors, so it could be many of the errors in https://developer.apple.com/documentation/foundation/cocoaerror

Just an educated guess, at least also these: