title: How to move files and folders to Trash programmatically on macOS?
body: <p>All I can find on this topic is mentions of <code>FSMoveObjectToTrashSync</code> function, which is now <a href="https://developer.apple.com/documentation/coreservices/1566651-fsmoveobjecttotrashsync" rel="nofollow noreferrer">deprecated and no alternative is listed for it</a>.</p>
  
  <p>How to do it from C or Objective-C code?</p>