Replies: 1 comment
-
Thanks for summarising the current state of trashing on MacOS.
It seems that no matter what is done, no choice is really without its issues. From what I can tell, the best would be if one could re-implement everything the Finder does, including writing correct The way of the python script I wouldn't want to go, personally, but I see the possibility of 'choosing' which implementation to use by means of cargo features. That way, the application developer can pick their poison. And if that's a thing, everything is possible - it just wouldn't ever replace the current implementation which is slow but most compatible. |
Beta Was this translation helpful? Give feedback.
-
What do you think about adding direct support to deleting/restoring files on a Mac without using the existing deficient APIs?
On a Mac your library uses (as far as I understand) two methods:
The AppleScript has the documented downside (slow, beeps, asks for permissions, requires Finder (which if you use an alternative file manager adds an extra startup delay) etc), but enables put back
The FileManager has to main issues:
but it has not other issues like AS. This could be solved by manually editing
.DS_Store
, but it was rejected due to:.DS_Store
(there seems to only be a rust create to read it, but not write)Alternatively you could do something like what's been implemented in this Python script: delete all the files using Rust std FS directly, and save the original paths as
xattr
metadata for later restoration and restore using that same metadata? Or maybe even write your own custom file format somewhereBeta Was this translation helpful? Give feedback.
All reactions