3.2.4.2.45.27 ClearFileProperty (Opnum 33)

The ClearFileProperty method is used to clear the specified Property Definition Instance from a file or folder.

 [id(FSRM_DISPID_CLASSIFICATION_MANAGER | 0x10)] HRESULT ClearFileProperty(
   [in] BSTR filePath,
   [in] BSTR property
 );

filePath: The file or folder that contains the Property Definition Instance that you want to remove. You can specify an absolute or relative path to the file or folder. You cannot specify a file share.

property: Contains the name of the Property Definition Instance to remove from the file.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80045301

FSRM_E_NOT_FOUND

The specified property could not be found.

0x80045354

FSRM_E_SET_PROPERTY_FAILED

The property could not be set.

0x80045357

FSRM_E_PARTIAL_CLASSIFICATION_PROPERTY_NOT_FOUND

The requested property was not found, but the file might only have partial classification because a failure occurred while loading or classifying the file properties.

The server MUST perform the following steps or return a nonzero error code.

  1. If a Property Definition Instance with the Property Definition Instance specified by propertyName does not exist, the server MUST return FSRM_E_PARTIAL_CLASSIFICATION_PROPERTY_NOT_FOUND.

  2. Perform the Retrieve Stored Classification Properties for the file.

  3. If the List of Property Definition Instances contains a Property Definition Instance with the Property Definition.Name specified by propertyName, the server MUST remove that instance from the List of Property Definition Instances.

  4. Perform the Store Classification Properties action for the file given the List of Property Definition Instances from the previous actions.

  5. If any of the property definition instance.flags of the Property Definition Instances in the List of Property Definition Instances contains the flag FsrmPropertyFlags_FailedSavingProperties, the server MUST return FSRM_E_SET_PROPERTY_FAILED.