question

ChiehYu-5700 avatar image
0 Votes"
ChiehYu-5700 asked XiaopoYang-MSFT answered

[cfAPI] How to report a file is no longer exist and stop fetching?

Hi MS team,

I'm developing sync program with cloud filter API. I notice that some antivirus will hook system function (i.e. CreateFile) and trigger fetch callback.

In my scenario, the file was being deleted on server side, and my provider start to delete local placeholder. however, in the deletion process, fetch callback is triggered to hydrate an non-existent file (on server). As a result, I report STATUS_CLOUD_FILE_UNSUCCESSFUL in complete status, but the fetch callback is triggered again to hydrate file.

Here are two question I hope that I can get some help.

1) how to prevent antivirus hydrate file content? should I add some flag when I call CreateFile? or I need some setup for cloud filter sync root?

2) what status code is good for represent that the file is no longer exist and should not retry fetch.

Thank.

Chih

windows-apiwindows-app-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

XiaopoYang-MSFT avatar image
0 Votes"
XiaopoYang-MSFT answered

1,2) Perhaps you should try to report STATUS_NOT_A_CLOUD_FILE in complete status, but the fetch callback depends on antivirus’ custom behavior.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.