ProjFS does not expose a separate hydrate API like the Cloud Files API does.
In ProjFS, a file becomes a hydrated placeholder when its data is requested through the provider callback flow:
- An app opens the projected file.
- ProjFS invokes
PRJ_GET_FILE_DATA_CBfor the requested byte range. - The provider returns the data by calling
PrjWriteFileData. - After ProjFS receives the data, it writes it to disk and converts the file into a hydrated placeholder.
So for ProjFS, reading the file is the documented way to cause hydration. The callback documentation explicitly states that when ProjFS receives the data, it writes it to the file to convert it into a hydrated placeholder.
Also note the distinction between a hydrated placeholder and a full file:
- Hydrated placeholder: file content has been cached locally, but it is still a placeholder.
- Full file: the file’s primary data stream has been modified locally, or the file was created locally and does not exist in the provider store.
A hydrated placeholder does not become a full file just because it was recalled. Based on the documented state model, it becomes a full file when local modification occurs, such as opening it for write access.
If the requirement is an explicit hydrate API, that exists in the Cloud Files API as CfHydratePlaceholder, not in ProjFS. The ProjFS documentation also says that for scenarios needing features such as progress reporting or online/offline indication, the Cloud Files API should be considered instead.