DirectorySecurity クラス

定義

ディレクトリのアクセス制御と監査セキュリティを表します。 このクラスは継承できません。

public ref class DirectorySecurity sealed : System::Security::AccessControl::FileSystemSecurity
public sealed class DirectorySecurity : System.Security.AccessControl.FileSystemSecurity
[System.Security.SecurityCritical]
public sealed class DirectorySecurity : System.Security.AccessControl.FileSystemSecurity
type DirectorySecurity = class
    inherit FileSystemSecurity
[<System.Security.SecurityCritical>]
type DirectorySecurity = class
    inherit FileSystemSecurity
Public NotInheritable Class DirectorySecurity
Inherits FileSystemSecurity
継承
属性

次のコード例では、このクラスを DirectorySecurity 使用して、アクセス制御リスト (ACL) エントリをディレクトリに追加して削除します。 この例を実行するには、有効なユーザーまたはグループ アカウントを指定する必要があります。

using namespace System;
using namespace System::IO;
using namespace System::Security::AccessControl;

// Adds an ACL entry on the specified directory for the
// specified account.
void AddDirectorySecurity(String^ directoryName, String^ account, 
     FileSystemRights rights, AccessControlType controlType)
{
    // Create a new DirectoryInfo object.
    DirectoryInfo^ dInfo = gcnew DirectoryInfo(directoryName);

    // Get a DirectorySecurity object that represents the
    // current security settings.
    DirectorySecurity^ dSecurity = dInfo->GetAccessControl();

    // Add the FileSystemAccessRule to the security settings.
    dSecurity->AddAccessRule( gcnew FileSystemAccessRule(account,
        rights, controlType));

    // Set the new access settings.
    dInfo->SetAccessControl(dSecurity);
}

// Removes an ACL entry on the specified directory for the
// specified account.
void RemoveDirectorySecurity(String^ directoryName, String^ account,
     FileSystemRights rights, AccessControlType controlType)
{
    // Create a new DirectoryInfo object.
    DirectoryInfo^ dInfo = gcnew DirectoryInfo(directoryName);

    // Get a DirectorySecurity object that represents the
    // current security settings.
    DirectorySecurity^ dSecurity = dInfo->GetAccessControl();

    // Add the FileSystemAccessRule to the security settings.
    dSecurity->RemoveAccessRule(gcnew FileSystemAccessRule(account,
        rights, controlType));

    // Set the new access settings.
    dInfo->SetAccessControl(dSecurity);
}    

int main()
{
    String^ directoryName = "TestDirectory";
    String^ accountName = "MYDOMAIN\\MyAccount";
    if (!Directory::Exists(directoryName))
    {
        Console::WriteLine("The directory {0} could not be found.", 
            directoryName);
        return 0;
    }
    try
    {
        Console::WriteLine("Adding access control entry for {0}",
            directoryName);

        // Add the access control entry to the directory.
        AddDirectorySecurity(directoryName, accountName,
            FileSystemRights::ReadData, AccessControlType::Allow);

        Console::WriteLine("Removing access control entry from {0}",
            directoryName);

        // Remove the access control entry from the directory.
        RemoveDirectorySecurity(directoryName, accountName, 
            FileSystemRights::ReadData, AccessControlType::Allow);

        Console::WriteLine("Done.");
    }
    catch (UnauthorizedAccessException^)
    {
        Console::WriteLine("You are not authorised to carry" +
            " out this procedure.");
    }
    catch (System::Security::Principal::
        IdentityNotMappedException^)
    {
        Console::WriteLine("The account {0} could not be found.", accountName);
    }
}
using System;
using System.IO;
using System.Security.AccessControl;

namespace FileSystemExample
{
    class DirectoryExample
    {
        public static void Main()
        {
            try
            {
                string DirectoryName = "TestDirectory";

                Console.WriteLine("Adding access control entry for " + DirectoryName);

                // Add the access control entry to the directory.
                AddDirectorySecurity(DirectoryName, @"MYDOMAIN\MyAccount", FileSystemRights.ReadData, AccessControlType.Allow);

                Console.WriteLine("Removing access control entry from " + DirectoryName);

                // Remove the access control entry from the directory.
                RemoveDirectorySecurity(DirectoryName, @"MYDOMAIN\MyAccount", FileSystemRights.ReadData, AccessControlType.Allow);

                Console.WriteLine("Done.");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }

            Console.ReadLine();
        }

        // Adds an ACL entry on the specified directory for the specified account.
        public static void AddDirectorySecurity(string FileName, string Account, FileSystemRights Rights, AccessControlType ControlType)
        {
            // Create a new DirectoryInfo object.
            DirectoryInfo dInfo = new DirectoryInfo(FileName);

            // Get a DirectorySecurity object that represents the
            // current security settings.
            DirectorySecurity dSecurity = dInfo.GetAccessControl();

            // Add the FileSystemAccessRule to the security settings.
            dSecurity.AddAccessRule(new FileSystemAccessRule(Account,
                                                            Rights,
                                                            ControlType));

            // Set the new access settings.
            dInfo.SetAccessControl(dSecurity);
        }

        // Removes an ACL entry on the specified directory for the specified account.
        public static void RemoveDirectorySecurity(string FileName, string Account, FileSystemRights Rights, AccessControlType ControlType)
        {
            // Create a new DirectoryInfo object.
            DirectoryInfo dInfo = new DirectoryInfo(FileName);

            // Get a DirectorySecurity object that represents the
            // current security settings.
            DirectorySecurity dSecurity = dInfo.GetAccessControl();

            // Add the FileSystemAccessRule to the security settings.
            dSecurity.RemoveAccessRule(new FileSystemAccessRule(Account,
                                                            Rights,
                                                            ControlType));

            // Set the new access settings.
            dInfo.SetAccessControl(dSecurity);
        }
    }
}
Imports System.IO
Imports System.Security.AccessControl



Module DirectoryExample

    Sub Main()
        Try
            Dim DirectoryName As String = "TestDirectory"

            Console.WriteLine("Adding access control entry for " + DirectoryName)

            ' Add the access control entry to the directory.
            AddDirectorySecurity(DirectoryName, "MYDOMAIN\MyAccount", FileSystemRights.ReadData, AccessControlType.Allow)

            Console.WriteLine("Removing access control entry from " + DirectoryName)

            ' Remove the access control entry from the directory.
            RemoveDirectorySecurity(DirectoryName, "MYDOMAIN\MyAccount", FileSystemRights.ReadData, AccessControlType.Allow)

            Console.WriteLine("Done.")
        Catch e As Exception
            Console.WriteLine(e)
        End Try

        Console.ReadLine()

    End Sub


    ' Adds an ACL entry on the specified directory for the specified account.
    Sub AddDirectorySecurity(ByVal FileName As String, ByVal Account As String, ByVal Rights As FileSystemRights, ByVal ControlType As AccessControlType)
        ' Create a new DirectoryInfoobject.
        Dim dInfo As New DirectoryInfo(FileName)

        ' Get a DirectorySecurity object that represents the 
        ' current security settings.
        Dim dSecurity As DirectorySecurity = dInfo.GetAccessControl()

        ' Add the FileSystemAccessRule to the security settings. 
        dSecurity.AddAccessRule(New FileSystemAccessRule(Account, Rights, ControlType))

        ' Set the new access settings.
        dInfo.SetAccessControl(dSecurity)

    End Sub


    ' Removes an ACL entry on the specified directory for the specified account.
    Sub RemoveDirectorySecurity(ByVal FileName As String, ByVal Account As String, ByVal Rights As FileSystemRights, ByVal ControlType As AccessControlType)
        ' Create a new DirectoryInfo object.
        Dim dInfo As New DirectoryInfo(FileName)

        ' Get a DirectorySecurity object that represents the 
        ' current security settings.
        Dim dSecurity As DirectorySecurity = dInfo.GetAccessControl()

        ' Add the FileSystemAccessRule to the security settings. 
        dSecurity.RemoveAccessRule(New FileSystemAccessRule(Account, Rights, ControlType))

        ' Set the new access settings.
        dInfo.SetAccessControl(dSecurity)

    End Sub
End Module

注釈

このクラスは DirectorySecurity 、システム ディレクトリのアクセス権と、アクセス試行の監査方法を指定します。 このクラスは、一連の規則としてのアクセス権と監査権限を表します。 各アクセス規則はオブジェクトによって FileSystemAccessRule 表され、各監査規則はオブジェクトによって FileSystemAuditRule 表されます。

このDirectorySecurityクラスは、基になるWindowsファイル セキュリティ システムの抽象化です。 このシステムでは、各ディレクトリには、ディレクトリへのアクセスを制御する随意アクセス制御リスト (DACL) と、監査されるアクセス制御の試行を指定するシステム アクセス制御リスト (SACL) があります。 クラス FileSystemAccessRule とは、DACL と FileSystemAuditRule SACL を構成するアクセス制御エントリ (ACE) の抽象化です。

このクラスでは DirectorySecurity 、DACL と SACL の詳細の多くが非表示になります。ACE の順序付けや null DACLS について心配する必要はありません。

このクラスを FileSecurity 使用して、ファイルの DACL と SACL を表すアクセス規則を取得、追加、または変更します。

次の表に、ディレクトリ セキュリティへのアクセスと保守に使用できる方法を示します。

タスク メソッド
ルールを追加する FileSystemSecurity.AddAccessRule

FileSystemSecurity.AddAuditRule
ルールの削除 FileSystemSecurity.RemoveAccessRule

FileSystemSecurity.RemoveAuditRule
ディレクトリへのアクセス制御を取得する Directory.GetAccessControl

DirectoryInfo.GetAccessControl
ディレクトリへのアクセス制御を保持する Directory.SetAccessControl

DirectoryInfo.SetAccessControl

コンストラクター

DirectorySecurity()

DirectorySecurity クラスの新しいインスタンスを初期化します。

DirectorySecurity(String, AccessControlSections)

DirectorySecurity 列挙体の値を指定して、指定したディレクトリの AccessControlSections クラスの新しいインスタンスを初期化します。

プロパティ

AccessRightType

FileSystemSecurity クラスでアクセス権を表すために使用する列挙体を取得します。

(継承元 FileSystemSecurity)
AccessRulesModified

この ObjectSecurity オブジェクトに関連するアクセス規則が変更されたかどうかを指定するブール値を取得または設定します。

(継承元 ObjectSecurity)
AccessRuleType

FileSystemSecurity クラスでアクセス規則を表すために使用する列挙体を取得します。

(継承元 FileSystemSecurity)
AreAccessRulesCanonical

この ObjectSecurity オブジェクトに関連するアクセス規則の順序が正規順序であるかどうかを指定するブール値を取得します。

(継承元 ObjectSecurity)
AreAccessRulesProtected

この ObjectSecurity オブジェクトに関連付けられている随意アクセス制御リスト (DACL) が保護されているかどうかを指定するブール値を取得します。

(継承元 ObjectSecurity)
AreAuditRulesCanonical

この ObjectSecurity オブジェクトに関連する監査規則の順序が正規順序であるかどうかを指定するブール値を取得します。

(継承元 ObjectSecurity)
AreAuditRulesProtected

この ObjectSecurity オブジェクトに関連付けられているシステム アクセス制御リスト (SACL) が保護されているかどうかを指定するブール値を取得します。

(継承元 ObjectSecurity)
AuditRulesModified

この ObjectSecurity オブジェクトに関連する監査規則が変更されたかどうかを指定するブール値を取得または設定します。

(継承元 ObjectSecurity)
AuditRuleType

FileSystemSecurity クラスで監査規則を表すために使用する型を取得します。

(継承元 FileSystemSecurity)
GroupModified

セキュリティ保護可能なオブジェクトと関連付けられているグループが変更されているかどうかを指定するブール値を取得または設定します。

(継承元 ObjectSecurity)
IsContainer

この ObjectSecurity オブジェクトがコンテナー オブジェクトかどうかを指定するブール値を取得します。

(継承元 ObjectSecurity)
IsDS

この ObjectSecurity オブジェクトがディレクトリ オブジェクトかどうかを指定するブール値を取得します。

(継承元 ObjectSecurity)
OwnerModified

セキュリティ保護可能なオブジェクトの所有者が変更されているかどうかを指定するブール値を取得または設定します。

(継承元 ObjectSecurity)
SecurityDescriptor

このインスタンスのセキュリティ記述子を取得します。

(継承元 ObjectSecurity)

メソッド

AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType)

アクセス権、アクセス制御、およびフラグを指定して、指定したユーザーの新しいアクセス制御規則を表す FileSystemAccessRule クラスの新しいインスタンスを初期化します。

(継承元 FileSystemSecurity)
AddAccessRule(AccessRule)

指定したアクセス規則を、この CommonObjectSecurity オブジェクトに関連付けられた随意アクセス制御リスト (DACL: Discretionary Access Control List) に追加します。

(継承元 CommonObjectSecurity)
AddAccessRule(FileSystemAccessRule)

アクセス制御リスト (ACL) の指定したアクセス許可を現在のファイルまたはディレクトリに追加します。

(継承元 FileSystemSecurity)
AddAuditRule(AuditRule)

指定した監査規則を、この CommonObjectSecurity オブジェクトに関連付けられたシステム アクセス制御リスト (SACL: System Access Control List) に追加します。

(継承元 CommonObjectSecurity)
AddAuditRule(FileSystemAuditRule)

指定した監査規則を現在のファイルまたはディレクトリに追加します。

(継承元 FileSystemSecurity)
AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags)

指定したユーザーの指定した監査規則を表す FileSystemAuditRule クラスの新しいインスタンスを初期化します。

(継承元 FileSystemSecurity)
Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetAccessRules(Boolean, Boolean, Type)

指定したセキュリティ識別子に関連付けられたアクセス規則のコレクションを取得します。

(継承元 CommonObjectSecurity)
GetAuditRules(Boolean, Boolean, Type)

指定したセキュリティ識別子に関連付けられた監査規則のコレクションを取得します。

(継承元 CommonObjectSecurity)
GetGroup(Type)

指定された所有者に関連付けられているプライマリ グループを取得します。

(継承元 ObjectSecurity)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetOwner(Type)

指定されたプライマリ グループに関連付けられている所有者を取得します。

(継承元 ObjectSecurity)
GetSecurityDescriptorBinaryForm()

この ObjectSecurity オブジェクトに関するセキュリティ記述子の情報を表すバイト値の配列を返します。

(継承元 ObjectSecurity)
GetSecurityDescriptorSddlForm(AccessControlSections)

ObjectSecurity オブジェクトに関連付けられているセキュリティ記述子の指定したセクションにあるセキュリティ記述子定義言語 (SDDL) 表現を返します。

(継承元 ObjectSecurity)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ModifyAccess(AccessControlModification, AccessRule, Boolean)

この CommonObjectSecurity オブジェクトに関連付けられている随意アクセス制御リスト (DACL) への指定された変更を適用します。

(継承元 CommonObjectSecurity)
ModifyAccessRule(AccessControlModification, AccessRule, Boolean)

この ObjectSecurity オブジェクトに関連付けられている随意アクセス制御リスト (DACL) への指定された変更を適用します。

(継承元 ObjectSecurity)
ModifyAudit(AccessControlModification, AuditRule, Boolean)

指定された変更を、この CommonObjectSecurity オブジェクトに関連付けられているシステム アクセス制御リスト (SACL) に適用します。

(継承元 CommonObjectSecurity)
ModifyAuditRule(AccessControlModification, AuditRule, Boolean)

指定された変更を、この ObjectSecurity オブジェクトに関連付けられているシステム アクセス制御リスト (SACL) に適用します。

(継承元 ObjectSecurity)
Persist(Boolean, String, AccessControlSections)

この ObjectSecurity オブジェクトに関連付けられたセキュリティ記述子の指定されたセクションを、永続ストレージに保存します。 コンストラクターと persist メソッドに渡される includeSections パラメーターの値を同一にすることをお勧めします。

(継承元 ObjectSecurity)
Persist(SafeHandle, AccessControlSections)

この NativeObjectSecurity オブジェクトに関連付けられたセキュリティ記述子の指定されたセクションを、永続ストレージに保存します。 コンストラクターと persist メソッドに渡される includeSections パラメーターの値を同一にすることをお勧めします。

(継承元 NativeObjectSecurity)
Persist(SafeHandle, AccessControlSections, Object)

この NativeObjectSecurity オブジェクトに関連付けられたセキュリティ記述子の指定されたセクションを、永続ストレージに保存します。 コンストラクターと persist メソッドに渡される includeSections パラメーターの値を同一にすることをお勧めします。

(継承元 NativeObjectSecurity)
Persist(String, AccessControlSections)

この NativeObjectSecurity オブジェクトに関連付けられたセキュリティ記述子の指定されたセクションを、永続ストレージに保存します。 コンストラクターと persist メソッドに渡される includeSections パラメーターの値を同一にすることをお勧めします。

(継承元 NativeObjectSecurity)
Persist(String, AccessControlSections, Object)

この NativeObjectSecurity オブジェクトに関連付けられたセキュリティ記述子の指定されたセクションを、永続ストレージに保存します。 コンストラクターと persist メソッドに渡される includeSections パラメーターの値を同一にすることをお勧めします。

(継承元 NativeObjectSecurity)
PurgeAccessRules(IdentityReference)

指定した IdentityReference と関連付けられているすべてのアクセス規則をすべて削除します。

(継承元 ObjectSecurity)
PurgeAuditRules(IdentityReference)

指定した IdentityReference と関連付けられている監査規則をすべて削除します。

(継承元 ObjectSecurity)
ReadLock()

読み取りアクセス用のこの ObjectSecurity オブジェクトをロックします。

(継承元 ObjectSecurity)
ReadUnlock()

読み取りアクセス用のこの ObjectSecurity オブジェクトをロック解除します。

(継承元 ObjectSecurity)
RemoveAccessRule(AccessRule)

指定したアクセス規則と同じセキュリティ識別子とアクセス マスクを含むアクセス規則を、この CommonObjectSecurity オブジェクトに関連付けられた随意アクセス制御リスト (DACL: Discretionary Access Control List) から削除します。

(継承元 CommonObjectSecurity)
RemoveAccessRule(FileSystemAccessRule)

現在のファイルまたはディレクトリから、アクセス制御リスト (ACL) の一致するすべての許可するアクセス許可、または拒否するアクセス許可を削除します。

(継承元 FileSystemSecurity)
RemoveAccessRuleAll(AccessRule)

指定したアクセス規則と同じセキュリティ識別子を含むすべてのアクセス規則を、この CommonObjectSecurity オブジェクトに関連付けられた随意アクセス制御リスト (DACL: Discretionary Access Control List) から削除します。

(継承元 CommonObjectSecurity)
RemoveAccessRuleAll(FileSystemAccessRule)

現在のファイルまたはディレクトリから、指定したユーザーのアクセス制御リスト (ACL) のすべてのアクセス許可を削除します。

(継承元 FileSystemSecurity)
RemoveAccessRuleSpecific(AccessRule)

指定したアクセス規則と完全に一致するすべてのアクセス規則を、この CommonObjectSecurity オブジェクトに関連付けられた随意アクセス制御リスト (DACL: Discretionary Access Control List) から削除します。

(継承元 CommonObjectSecurity)
RemoveAccessRuleSpecific(FileSystemAccessRule)

現在のファイルまたはディレクトリから、アクセス制御リスト (ACL) の一致する単一の許可するアクセス許可、または拒否するアクセス許可を削除します。

(継承元 FileSystemSecurity)
RemoveAuditRule(AuditRule)

指定した監査規則と同じセキュリティ識別子とアクセス マスクを含む監査規則を、この CommonObjectSecurity オブジェクトに関連付けられたシステム アクセス制御リスト (SACL: System Access Control List) から削除します。

(継承元 CommonObjectSecurity)
RemoveAuditRule(FileSystemAuditRule)

現在のファイルまたはディレクトリから、一致するすべての許可する監査規則または拒否する監査規則を削除します。

(継承元 FileSystemSecurity)
RemoveAuditRuleAll(AuditRule)

指定した監査規則と同じセキュリティ識別子を含むすべての監査規則を、この CommonObjectSecurity オブジェクトに関連付けられたシステム アクセス制御リスト (SACL: System Access Control List) から削除します。

(継承元 CommonObjectSecurity)
RemoveAuditRuleAll(FileSystemAuditRule)

現在のファイルまたはディレクトリから、指定したユーザーのすべての監査規則を削除します。

(継承元 FileSystemSecurity)
RemoveAuditRuleSpecific(AuditRule)

指定した監査規則と完全に一致するすべての監査規則を、この CommonObjectSecurity オブジェクトに関連付けられたシステム アクセス制御リスト (SACL: System Access Control List) から削除します。

(継承元 CommonObjectSecurity)
RemoveAuditRuleSpecific(FileSystemAuditRule)

現在のファイルまたはディレクトリから、一致する単一の許可する監査規則または拒否する監査規則を削除します。

(継承元 FileSystemSecurity)
ResetAccessRule(AccessRule)

この CommonObjectSecurity オブジェクトに関連付けられた随意アクセス制御リスト (DACL: Discretionary Access Control List) 内のすべてのアクセス規則を削除し、指定したアクセス規則を追加します。

(継承元 CommonObjectSecurity)
ResetAccessRule(FileSystemAccessRule)

アクセス制御リスト (ACL) の指定したアクセス許可を現在のファイルまたはディレクトリに追加し、ACL の一致するすべてのアクセス許可を削除します。

(継承元 FileSystemSecurity)
SetAccessRule(AccessRule)

指定したアクセス規則と同じセキュリティ識別子と修飾子を含むすべてのアクセス規則を、この CommonObjectSecurity オブジェクトに関連付けられた随意アクセス制御リスト (DACL: Discretionary Access Control List) から削除し、指定したアクセス規則を追加します。

(継承元 CommonObjectSecurity)
SetAccessRule(FileSystemAccessRule)

現在のファイルまたはディレクトリに、アクセス制御リスト (ACL) の指定したアクセス許可を設定します。

(継承元 FileSystemSecurity)
SetAccessRuleProtection(Boolean, Boolean)

この ObjectSecurity オブジェクトに関連付けられたアクセス規則の保護を設定または削除します。 保護されたアクセス規則を親オブジェクトが継承によって変更することはできません。

(継承元 ObjectSecurity)
SetAuditRule(AuditRule)

指定した監査規則と同じセキュリティ識別子と修飾子を含むすべての監査規則を、この CommonObjectSecurity オブジェクトに関連付けられたシステム アクセス制御リスト (SACL: System Access Control List) から削除し、指定した監査規則を追加します。

(継承元 CommonObjectSecurity)
SetAuditRule(FileSystemAuditRule)

現在のファイルまたはディレクトリに指定した監査規則を設定します。

(継承元 FileSystemSecurity)
SetAuditRuleProtection(Boolean, Boolean)

この ObjectSecurity オブジェクトに関連付けられた監査規則の保護を設定または削除します。 保護された監査規則は、親オブジェクトによる継承によって変更できません。

(継承元 ObjectSecurity)
SetGroup(IdentityReference)

この ObjectSecurity オブジェクトに関連付けられているセキュリティ記述子のプライマリ グループを設定します。

(継承元 ObjectSecurity)
SetOwner(IdentityReference)

このObjectSecurity オブジェクトに関連付けられているセキュリティ記述子の所有者を設定します。

(継承元 ObjectSecurity)
SetSecurityDescriptorBinaryForm(Byte[])

バイト値の指定された配列から、この ObjectSecurity オブジェクトに関するセキュリティ記述子を設定します。

(継承元 ObjectSecurity)
SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections)

バイト値の指定された配列から、この ObjectSecurity オブジェクトに関するセキュリティ記述子の指定されたセクションを設定します。

(継承元 ObjectSecurity)
SetSecurityDescriptorSddlForm(String)

指定したセキュリティ記述子定義言語 (SDDL) 文字列から、ObjectSecurity オブジェクトのセキュリティ記述子を設定します。

(継承元 ObjectSecurity)
SetSecurityDescriptorSddlForm(String, AccessControlSections)

指定したセキュリティ記述子定義言語 (SDDL) 文字列から、ObjectSecurity オブジェクトのセキュリティ記述子の指定したセクションを設定します。

(継承元 ObjectSecurity)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)
WriteLock()

書き込みアクセス用のこの ObjectSecurity オブジェクトをロックします。

(継承元 ObjectSecurity)
WriteUnlock()

書き込みアクセス用にこの ObjectSecurity オブジェクトのロックを解除します。

(継承元 ObjectSecurity)

拡張メソッド

CreateDirectory(DirectorySecurity, String)

指定したディレクトリ セキュリティを使用してディレクトリが作成されて返されます。 ディレクトリが既に存在する場合は、既存のディレクトリが返されます。

適用対象