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

Chieh Yu 1 Reputation point
2021-08-25T16:37:37.163+00:00

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 App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
728 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,428 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 11,501 Reputation points Microsoft Vendor
    2021-08-26T08:43:05.077+00:00

    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.

    0 comments No comments