Post

Replies

Boosts

Views

Activity

Public API for in-place on-demand files in an arbitrary existing folder on macOS 13?
I am implementing a sandboxed macOS sync app using NSFileProviderReplicatedExtension, with a minimum deployment target of macOS 13. The requirement is for a user to select an arbitrary existing, nonempty APFS directory, for example /Users/example/Documents/SyncExample, and turn its synchronized files into real on-demand items while preserving that directory's original physical path and file-system identity. Moving it into CloudStorage, substituting a symlink or alias, or changing only Finder presentation would not satisfy the requirement. After the exact file version has been uploaded and verified, the app needs to support safe native eviction and later materialization in that same directory. The documentation for NSFileProviderManager.import(_:fromDirectoryAt:completionHandler:) describes migration into the system's managed cache, after which the original URL is no longer valid: https://developer.apple.com/documentation/fileprovider/nsfileprovidermanager/import(_:fromdirectoryat:completionhandler:) The documented Desktop/Documents and external-volume features do not appear to select an arbitrary subdirectory: https://developer.apple.com/documentation/Updates/FileProvider Is there a supported public API that meets this requirement on macOS 13? If not, does a newer macOS version support this for arbitrary existing subdirectories, rather than only known folders or volume placement? Please point me to the appropriate API and its precise constraints, or clarify the platform limitation. No private APIs, manual dataless flags, or fake placeholders would be used. The directory above is fictional.
1
0
87
5h
Public API for in-place on-demand files in an arbitrary existing folder on macOS 13?
I am implementing a sandboxed macOS sync app using NSFileProviderReplicatedExtension, with a minimum deployment target of macOS 13. The requirement is for a user to select an arbitrary existing, nonempty APFS directory, for example /Users/example/Documents/SyncExample, and turn its synchronized files into real on-demand items while preserving that directory's original physical path and file-system identity. Moving it into CloudStorage, substituting a symlink or alias, or changing only Finder presentation would not satisfy the requirement. After the exact file version has been uploaded and verified, the app needs to support safe native eviction and later materialization in that same directory. The documentation for NSFileProviderManager.import(_:fromDirectoryAt:completionHandler:) describes migration into the system's managed cache, after which the original URL is no longer valid: https://developer.apple.com/documentation/fileprovider/nsfileprovidermanager/import(_:fromdirectoryat:completionhandler:) The documented Desktop/Documents and external-volume features do not appear to select an arbitrary subdirectory: https://developer.apple.com/documentation/Updates/FileProvider Is there a supported public API that meets this requirement on macOS 13? If not, does a newer macOS version support this for arbitrary existing subdirectories, rather than only known folders or volume placement? Please point me to the appropriate API and its precise constraints, or clarify the platform limitation. No private APIs, manual dataless flags, or fake placeholders would be used. The directory above is fictional.
Replies
1
Boosts
0
Views
87
Activity
5h