[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX
From: |
Alan Third |
Subject: |
bug#21340: 24.5; trash-directory uses FreeDesktop location on OSX |
Date: |
Thu, 2 Dec 2021 21:58:35 +0000 |
On Thu, Dec 02, 2021 at 10:31:27AM +0100, Lars Ingebrigtsen wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> > Or to define a system-move-file-to-trash, which defers to the
> > (presumably existing) system function that does that for us.
>
> Alan, do you know whether this would make sense on Macos?
>
> If not, then I think Glenn's suggestion here makes sense, i.e., add:
>
> (if (eq system-type 'darwin) "~/.Trash/")
It looks like there's a method available to trash items on macOS 10.8
and above, so I suppose that's the logical thing to use.
https://developer.apple.com/documentation/foundation/nsfilemanager/1414306-trashitematurl?language=objc
macOS < 10.8 uses some Carbon API, which I'd rather not bother with,
and GNUstep doesn't support it at all, so I imagine it's as well using
the XDG location or whatever the default is.
--
Alan Third