<div class="content"><p>The <b>GetFileProperty</b> method is used to get a specific <a href="666f71d4-2f9d-4a15-9e9a-1a1190cc9313" data-linktype="relative-path">Property Definition Instance</a>
from a file or folder.</p><dl>
<dd>
<div><pre> [id(FSRM_DISPID_CLASSIFICATION_MANAGER | 0x0E)] HRESULT GetFileProperty(
   [in] BSTR filePath,
   [in] BSTR propertyName,
   [in, defaultvalue(FsrmGetFilePropertyOptions_None)] 
     FsrmGetFilePropertyOptions options,
   [out, retval] IFsrmProperty** property
 );
</pre></div>
</dd></dl><p><b>filePath: </b>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.</p><p><b>propertyName: </b>Contains the name of the
Property Definition Instance to retrieve.</p><p><b>options: </b>Contains the option to use for
retrieving the file&#39;s Property Definition Instance. For possible values, see
the <a href="172f4462-c263-4098-9b30-010de0e573de" data-linktype="relative-path">FsrmGetFilePropertyOptions (section 2.2.2.5.1.2)</a>
enumeration.</p><p><b>property: </b>Pointer to an <b>IFsrmProperty</b>
interface pointer (section <a href="df7e1162-c2fc-45cb-9047-4afb0f9a558d" data-linktype="relative-path">3.2.4.2.40</a>)
that contains the retrieved Property Definition Instance.</p><p><b>Return Values: </b>The method MUST return zero on
success, or a nonzero error code on failure.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x80045301</p>
  <p>FSRM_E_NOT_FOUND</p>
  </td>
  <td>
  <p>An object with the specified property name was not
  found.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>E_INVALIDARG</p>
  </td>
  <td>
  <p>The <i>property</i> parameter is NULL.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>Upon receiving this message, the server MUST validate
parameters:</p><ul><li><p><span><span> 
</span></span>Verify that <b>property</b> is not NULL.</p>
</li></ul><p>If any validation fails, the server MUST terminate processing
and return a nonzero error code.</p><p>The server MUST perform the following steps or return a
nonzero error code:</p><ol><li><p><span>    </span>Perform the <a href="8fe62844-c8f1-4317-9752-9706ea401638" data-linktype="relative-path">Retrieve stored classification
properties</a> for the file.</p>
</li><li><p><span>    </span>If <b>options</b>
does not contain FsrmGetFilePropertyOptions_NoRuleEvaluation, perform the <a href="5e49c580-6b10-48a6-9661-fab7f9b0c724" data-linktype="relative-path">Generate new classification
properties</a> action for the file given the list of <b>Property Definition
Instances</b> from the previous action. If the property definition
instance.flags of any of the resulting <b>Property Definition Instances</b>
contains <a href="70d61c14-fbed-4e94-bfe7-49ae14c1a02c" data-linktype="relative-path">FsrmPropertyFlags_SetByClassifier</a>,
add the file to the <a href="c916b18a-8094-42a4-84b8-5c5e57df1e97" data-linktype="relative-path">Report
item list</a>.</p>
</li><li><p><span>    </span>If <b>options</b>
contains FsrmGetFilePropertyOptions_Persistent, perform the <a href="b018899d-6743-410c-9bc2-7d43afa56e50" data-linktype="relative-path">Store classification
properties</a> action for the file given the <a href="a4da1447-54a5-4b37-b135-bfa7481aed1c" data-linktype="relative-path">List of Property Definition
Instances</a> from the previous actions.</p>
</li><li><p><span>    </span>If a <b>Property
Definition Instance</b> with the <b>Property Definition Instance</b> specified
by <b>propertyName</b> does not exist, the server MUST return FSRM_E_NOT_FOUND.</p>
</li><li><p><span>    </span>The server MUST
set <b>property</b> to the IFsrmProperty interface pointer of the <b>Property
Definition Instance</b> in the List of Property Definition Instances with the <a href="aeb8c879-da1a-4676-8d16-d7f85bac7a04" data-linktype="relative-path">Property Definition.Name</a>
specified by <b>propertyName</b>.</p>
</li><li><p><span>    </span>If <b>options</b>
contains FsrmGetFilePropertyOptions_FailOnPersistErrors and any of the property
definition instance.flags of the <b>property definition instances</b> in the
List of Property Definition Instances contains the flag
FsrmPropertyFlags_FailedSavingProperties, the server MUST return
FSRM_S_PARTIAL_CLASSIFICATION.</p>
</li></ol></div>