How to trigger a background pre-loading of a folder tree

Is it possible to notify my fileprovider extension to pre-load folders recursively from a given starting point ?

I am currently doing this externally from user space with a thread that crawls through the folder tree but wondering if there is a better way.

You can set -[NSFileProviderItem contentPolicy] property to NSFileProviderContentPolicyDownloadEagerlyAndKeepDownloaded on those directories. You’ll need to set an explicit policy on the Documents parented to these directories, to avoid them using the default Inherited policy, which would cause the documents to be downloaded as well.

For items already returned to the system, you can push working set updates for those items, to update their contentPolicy.

Thanks for your answer exactly what I needed.

Great change to help developers Apple

How to trigger a background pre-loading of a folder tree
 
 
Q