careful_rm
careful_rm copied to clipboard
Skip Applescript on MacOS
The code works fine on Mac, but it is slow because applescript is slow, I think there should be a way to bypass applescript by editing the .DS_Store
files, but I haven't bothered yet as there isn't good documentation on how this even works.
macOS ships with Python2.7 and PyObjC as standard. Use -[NSFileManager trashItemAtURL:resultingItemURL:error:]
.