22.214.171.124.46.1 ClassifyFiles (Opnum 34)
The ClassifyFiles method is used to get or set a specific Property Definition Instance from/on one or more files/folders.
[id(FSRM_DISPID_CLASSIFICATION_MANAGER2 | 0x01), helpstring("This method is used to perform bulk enumeration, setting, and clearing of file properties")] HRESULT ClassifyFiles( [in] SAFEARRAY(VARIANT) filePaths, [in, unique] SAFEARRAY(VARIANT) propertyNames, [in, unique] SAFEARRAY(VARIANT) propertyValues, [in, defaultvalue(FsrmGetFilePropertyOptions_None)] FsrmGetFilePropertyOptions options );
filePaths: The files or folders that contain the Property Definition Instances that you want to retrieve or that you want to modify. You can specify an absolute or relative path to the files or folders. You cannot specify a file share.
propertyNames: Contains the names of the Property Definition Instance to retrieve or set.
propertyValues: Contains the value to set the Property Definition Instances to.
options: Contains the option to use for retrieving the Property Definition Instances. For possible values, see the FsrmGetFilePropertyOptions (section 126.96.36.199.1.2) enumeration.
Return Values: The method MUST return zero on success, or a nonzero error code on failure.
An object with the specified property name was not found.
The filePaths parameter is NULL.
The propertyNames parameter has a different length than propertyValues.
Upon receiving this message, the server MUST validate parameters:
Verify that filePaths is not NULL.
If PropertyNames is not NULL, verify that propertyValues is not NULL and that the length of the propertyNames array is the same as the length of the propertyValues array.
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 for all files within the filePaths array:
If a Property Definition Instance with the Property Definition Instance specified by propertyName does not exist, the server MUST return FSRM_E_NOT_FOUND.
For each file or folder listed in filePaths, the server MUST perform the following steps in sequence:
Perform the Retrieve Stored Classification Properties for the file.
Iterate over the propertyNames and propertyValues arrays in identical manner, selecting a pair of values located at the same index from each array (referred to as propertyName and propertyValue), and perform the following steps in sequence:
If propertyName is not NULL and the List of Property Definition Instances contains a Property Definition Instance with the Property Definition.Name specified by propertyName, that instance's property definition instance.value MUST be set to PropertyValue.
If propertyName is NULL and 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.
If the List of Property Definition Instances does not contain a Property Definition Instance with the Property Definition.Name specified by propertyName and propertyValue is not NULL, the server MUST create a new Property Definition Instance whose Property Definition.Name is set to propertyName and whose property definition instance.value is set to PropertyValue. The server MUST then add that new instance to the List of Property Definition Instances for the file.
Perform the Store classification properties action for the file given the List of Property Definition Instances from the previous actions.