ProjectedFileSystemUpdateFileIfNeeded Method |
Enables a provider to update an item that has been cached on the local file system.
Namespace:
ShellBoost.Core.ProjFS
Assembly:
ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax public virtual PRJ_UPDATE_FAILURE_CAUSES UpdateFileIfNeeded(
string filePath,
ProjectedFileSystemItem item,
PRJ_UPDATE_TYPES types = PRJ_UPDATE_TYPES.PRJ_UPDATE_ALLOW_DIRTY_METADATA|PRJ_UPDATE_TYPES.PRJ_UPDATE_ALLOW_DIRTY_DATA|PRJ_UPDATE_TYPES.PRJ_UPDATE_ALLOW_TOMBSTONE|PRJ_UPDATE_TYPES.PRJ_UPDATE_ALLOW_READ_ONLY,
bool throwOnError = true
)
Parameters
- filePath
- Type: SystemString
A string specifying the path, relative to the virtualization root, to the file or directory to be updated. - item
- Type: ShellBoost.Core.ProjFSProjectedFileSystemItem
The item to update. If the item's VersionInfo.ContentID contains a content identifier that is the same as the content identifier already on the file/directory, the call succeeds and no update takes place. Otherwise, if the call succeeds then the item's VersionInfo.ContentID replaces the existing content identifier on the file. - types (Optional)
- Type: ShellBoost.Core.ProjFSPRJ_UPDATE_TYPES
Flags to control updates. If the item is a dirty placeholder, full file, or tombstone, and the provider does not specify the appropriate flag(s), this routine will fail to update the placeholder. - throwOnError (Optional)
- Type: SystemBoolean
if set to true errors may be thrown otherwise the return value may be null.
Return Value
Type:
PRJ_UPDATE_FAILURE_CAUSESA value that describes the reason for the failure, if any.
See Also