Set FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS Attribute

Hi All,

There are new file attribute FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS for the cloudfile, I tried to use the API “SetFileAttributes”, it won’t add this file attribute.

Does anyone know how to set this file attribute?

Thanks
George

That flag is to indicate that the file/dir is not fully present locally. It’s used by CldFlt (and OneDrive) and is only settable by Kernel mode callers. I don’t think you would typically need to set it, as it seems like that would be better left to CldFlt.sys.

Yes, we are developing a HSM mini filter driver, it has similar requirement which doesn’t want the anti virus to download our stub files.
So we need to add that attribute from our filter driver?

Thanks
George

Correct. You should be able to set that flag (or create a new file with it) from a kernel mode caller.