Fileprovider Recycle Bin recovery does not trigger the create event, and dataless files should not be moved to the Recycle Bin

  1. I want to use FileProvder to implement the function of recovering from the recycle bin (the cloud recycle bin does not move, and after the local recycle bin is restored, the upload event is triggered again), but testing shows that the current recovery from the recycle bin is through the modifyItem event, and the CreateItem event is not triggered again to upload locally restored files
  2. Implement the deletion of undelivered files (dateless) without moving them to the recycle bin, which currently appears to be achieved by granting file. dash permission. But it is possible for the content of a file to be manually verified by the user. How can this be solved? How can we dynamically monitor whether a file is dataless

Thank you for your reply. Could you please help answer my question

Answered by mikra in 868178022

Just to check if a file under a given URL is dataless or not, you can have a look at URLUbiquitousItemDownloadingStatus.

Whether you can use this inside File Provider extension process or not, or how to know which URLs to check - that's a separate question I can't answer.

someone help me,thanks

Is anyone there? Can you help me! thank you

Accepted Answer

Just to check if a file under a given URL is dataless or not, you can have a look at URLUbiquitousItemDownloadingStatus.

Whether you can use this inside File Provider extension process or not, or how to know which URLs to check - that's a separate question I can't answer.

You can use -[NSFileProviderDomain supportsSyncingTrash] to tell the system that the domain does not support syncing the trash. When configured this way, the system will handle trashing of downloaded and dataless files appropriately on your behalf.

I am currently encountering a problem: during the process of uploading a large file, I have moved the file that was not successfully uploaded to the trash can. These two operations have been tested to be serial (triggering the 'create Item' callback first, followed by the 'modify Item' callback), which means that the file must be uploaded before it can be moved to the recycle bin (which can also result in the file being stored in the cloud recycle bin). I want to implement: directly interrupt this upload process and then do not complete the upload. How can I achieve this? Please help me. Thank you

Fileprovider Recycle Bin recovery does not trigger the create event, and dataless files should not be moved to the Recycle Bin
 
 
Q