I am implementing a File Provider on macOS. I see that OneDrive has an offline mode with ‘Always Keep on This Device’ and ‘Free up Space’ menus:
On Windows, this functionality is provided by Pinned and Unpinned file attributes as well as CfHydratePlaceholder() and CfDehydratePlaceholder() Windows API. How do I implement this functionality on macOS? Are there any specific attributes or File Provider API to support it?
On macOS 13, there is a new API: NSFileProviderContentPolicy.
Set the NSFileProviderItem.contentPolicy to downloadEagerlyAndKeepDownloaded will achieve the same effect as
Always Keep on This Device
on Windows.