PrjDeleteFile function (projectedfslib.h)

Enables a provider to delete an item that has been cached on the local file system.

Syntax

HRESULT PrjDeleteFile(
  [in]            PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT namespaceVirtualizationContext,
  [in]            PCWSTR                               destinationFileName,
  [in, optional]  PRJ_UPDATE_TYPES                     updateFlags,
  [out, optional] PRJ_UPDATE_FAILURE_CAUSES            *failureReason
);

Parameters

[in] namespaceVirtualizationContext

An opaque handle for the virtualization instance.

[in] destinationFileName

A null-terminated Unicode string specifying the path, relative to the virtualization root, to the file or directory to be deleted.

[in, optional] updateFlags

Flags to control the delete operation should be allowed given the state of the file.

[out, optional] failureReason

Optional pointer to receive a code describing the reason a delete failed.

Return value

If an HRESULT_FROM_WIN32(ERROR_FILE_SYSTEM_VIRTUALIZATION_INVALID_OPERATION) error is returned, the update failed due to the item's state and the value of updateFlags. failureReason, if specified, will describe the reason for the failure.

Remarks

If the item is still in the provider's backing store, deleting it from the local file system changes it to a virtual item.

This routine cannot be called on a virtual file/directory.

If the file/directory to be deleted is in any state other than "placeholder", the provider must specify an appropriate combination of PRJ_UPDATE_TYPES values in the updateFlags parameter. This helps guard against accidental loss of data.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809 [desktop apps only]
Minimum supported server Windows Server [desktop apps only]
Target Platform Windows
Header projectedfslib.h