共用方式為


FsrmQuotaManagerClass.CreateAutoApplyQuota Method (String, String)

 

Creates an automatic quota for the specified directory.

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

Syntax

public virtual IFsrmAutoApplyQuota CreateAutoApplyQuota(
    string quotaTemplateName,
    string Path
)
public:
virtual IFsrmAutoApplyQuota^ CreateAutoApplyQuota(
    String^ quotaTemplateName,
    String^ Path
)
abstract CreateAutoApplyQuota : 
        quotaTemplateName:string *
        Path:string -> IFsrmAutoApplyQuota
override CreateAutoApplyQuota : 
        quotaTemplateName:string *
        Path:string -> IFsrmAutoApplyQuota
Public Overridable Function CreateAutoApplyQuota (
    quotaTemplateName As String,
    Path As String
) As IFsrmAutoApplyQuota

Parameters

  • quotaTemplateName
    Type: System.String

    The name of a template from which to derive the quota; automatic quotas must derive from a template. The string is limited to 4,000 characters.

  • Path
    Type: System.String

    The local directory path to which the quota applies. The string is limited to 260 characters.

Return Value

Type: Microsoft.Storage.IFsrmAutoApplyQuota

Returns a IFsrmAutoApplyQuota interface to the newly created quota object. The specified template is used to initialize the quota. Use this interface to change the quota and to exclude specific subdirectories from the quota. To add the quota to FSRM, call Commit method.

Implements

IFsrmQuotaManager.CreateAutoApplyQuota(String, String)

Remarks

When you save the automatic quota, FSRM creates quotas for all existing subdirectories under the specified directory that do not already contain a quota. When a new subdirectory is created under the specified directory, FSRM uses the properties of the automatic quota to create a quota for the new subdirectory.

If you are creating both the automatic quota and the subdirectories at the same time, you should first create the subdirectories and then create the automatic quota because it provides better performance.

See Also

IFsrmQuotaManagerEx
FsrmQuotaManager
FsrmQuotaManagerClass Class
Microsoft.Storage Namespace

Return to top