다음을 통해 공유


FsrmClassificationManagerClass.SetFileProperty Method (String, String, String)

 

Sets the value of the specified property in the file or folder.

Namespace:   Microsoft.Storage
Assembly:  srmlib (in srmlib.dll)

Syntax

public virtual void SetFileProperty(
    string filePath,
    string PropertyName,
    string propertyValue
)
public:
virtual void SetFileProperty(
    String^ filePath,
    String^ PropertyName,
    String^ propertyValue
)
abstract SetFileProperty : 
        filePath:string *
        PropertyName:string *
        propertyValue:string -> unit
override SetFileProperty : 
        filePath:string *
        PropertyName:string *
        propertyValue:string -> unit
Public Overridable Sub SetFileProperty (
    filePath As String,
    PropertyName As String,
    propertyValue As String
)

Parameters

  • filePath
    Type: System.String

    The file that contains the property that you want to set. You must specify an absolute path to the file. You cannot specify a file share.

  • PropertyName
    Type: System.String

    The name of the property whose value you want to set.

  • propertyValue
    Type: System.String

    The value to set the specified property to.

Implements

IFsrmClassificationManager2.SetFileProperty(String, String, String)

Remarks

Windows Server 2008 R2:  Only files are supported until Windows Server 2012.

The method verifies that the property value is valid for the property's type. For example, for an ordered or multiple choice list, that the value is a member of the list; for a Boolean property, that the value is the string "0" or "1"; and for a date, that the value is a 64-bit decimal value expressed as a string.

SetFileProperty only supports property definitions that are available on the server whose AppliesTo property has the FsrmPropertyDefinitionAppliesTo_Files (1) bit set.

See Also

IFsrmClassificationManager2
IFsrmClassificationManager
ClearFileProperty
EnumFileProperties
GetFileProperty
FsrmClassificationManager
FsrmClassificationManagerClass Class
Microsoft.Storage Namespace
MSFT_FSRMClassification

Return to top