Bagikan melalui


FileSystemAclExtensions.SetAccessControl Metode

Definisi

Overload

SetAccessControl(DirectoryInfo, DirectorySecurity)

Mengubah atribut keamanan direktori yang ada.

SetAccessControl(FileInfo, FileSecurity)

Mengubah atribut keamanan file yang ada.

SetAccessControl(FileStream, FileSecurity)

Mengubah atribut keamanan file yang ada.

SetAccessControl(DirectoryInfo, DirectorySecurity)

Mengubah atribut keamanan direktori yang ada.

public:
[System::Runtime::CompilerServices::Extension]
 static void SetAccessControl(System::IO::DirectoryInfo ^ directoryInfo, System::Security::AccessControl::DirectorySecurity ^ directorySecurity);
public static void SetAccessControl (this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity);
static member SetAccessControl : System.IO.DirectoryInfo * System.Security.AccessControl.DirectorySecurity -> unit
<Extension()>
Public Sub SetAccessControl (directoryInfo As DirectoryInfo, directorySecurity As DirectorySecurity)

Parameter

directoryInfo
DirectoryInfo

Direktori yang ada.

directorySecurity
DirectorySecurity

Informasi keamanan yang akan diterapkan ke direktori.

Pengecualian

directorySecurityadalah null.

Berlaku untuk

SetAccessControl(FileInfo, FileSecurity)

Mengubah atribut keamanan file yang ada.

public:
[System::Runtime::CompilerServices::Extension]
 static void SetAccessControl(System::IO::FileInfo ^ fileInfo, System::Security::AccessControl::FileSecurity ^ fileSecurity);
public static void SetAccessControl (this System.IO.FileInfo fileInfo, System.Security.AccessControl.FileSecurity fileSecurity);
static member SetAccessControl : System.IO.FileInfo * System.Security.AccessControl.FileSecurity -> unit
<Extension()>
Public Sub SetAccessControl (fileInfo As FileInfo, fileSecurity As FileSecurity)

Parameter

fileInfo
FileInfo

File yang ada.

fileSecurity
FileSecurity

Informasi keamanan yang akan diterapkan ke file.

Pengecualian

fileSecurityadalah null.

Berlaku untuk

SetAccessControl(FileStream, FileSecurity)

Mengubah atribut keamanan file yang ada.

public:
[System::Runtime::CompilerServices::Extension]
 static void SetAccessControl(System::IO::FileStream ^ fileStream, System::Security::AccessControl::FileSecurity ^ fileSecurity);
public static void SetAccessControl (this System.IO.FileStream fileStream, System.Security.AccessControl.FileSecurity fileSecurity);
static member SetAccessControl : System.IO.FileStream * System.Security.AccessControl.FileSecurity -> unit
<Extension()>
Public Sub SetAccessControl (fileStream As FileStream, fileSecurity As FileSecurity)

Parameter

fileStream
FileStream

File yang ada.

fileSecurity
FileSecurity

Informasi keamanan yang akan diterapkan ke file.

Pengecualian

fileStream atau fileSecurity adalah null.

Aliran file ditutup.

Berlaku untuk