3.2.4.2.45.25 GetFileProperty (Opnum 31)

The GetFileProperty method is used to get a specific Property Definition Instance from a file or folder.

 [id(FSRM_DISPID_CLASSIFICATION_MANAGER | 0x0E)] HRESULT GetFileProperty(
   [in] BSTR filePath,
   [in] BSTR propertyName,
   [in, defaultvalue(FsrmGetFilePropertyOptions_None)] 
     FsrmGetFilePropertyOptions options,
   [out, retval] IFsrmProperty** property
 );

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

propertyName: Contains the name of the Property Definition Instance to retrieve.

options: Contains the option to use for retrieving the file's Property Definition Instance. For possible values, see the FsrmGetFilePropertyOptions (section 2.2.2.5.1.2) enumeration.

property: Pointer to an IFsrmProperty interface pointer (section 3.2.4.2.40) that contains the retrieved Property Definition Instance.

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

An object with the specified property name was not found.

0x80070057

E_INVALIDARG

The property parameter is NULL.

Upon receiving this message, the server MUST validate parameters:

  • Verify that property is not NULL.

If any validation fails, the server MUST terminate processing and return a nonzero error code.

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

  1. Perform the Retrieve stored classification properties for the file.

  2. If options does not contain FsrmGetFilePropertyOptions_NoRuleEvaluation, perform the Generate new classification properties action for the file given the list of Property Definition Instances from the previous action. If the property definition instance.flags of any of the resulting Property Definition Instances contains FsrmPropertyFlags_SetByClassifier, add the file to the Report item list.

  3. If options contains FsrmGetFilePropertyOptions_Persistent, perform the Store classification properties action for the file given the List of Property Definition Instances from the previous actions.

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

  5. The server MUST set property to the IFsrmProperty interface pointer of the Property Definition Instance in the List of Property Definition Instances with the Property Definition.Name specified by propertyName.

  6. If options contains FsrmGetFilePropertyOptions_FailOnPersistErrors and 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_S_PARTIAL_CLASSIFICATION.