System.IO.FileStream.GetAccessControl Method

Gets a System.Security.AccessControl.FileSecurity object that encapsulates the access control list (ACL) entries for the file described by the current System.IO.FileStream object.

Syntax

public System.Security.AccessControl.FileSecurity GetAccessControl ()

Returns

An object that encapsulates the access control settings for the file described by the current System.IO.FileStream object.

Remarks

While the System.IO.FileStream class and FileStream.GetAccessControl can be used to retrieve the access control list (ACL) entries of an existing file, consider using File.GetAccessControl(string) method, as it is easier to use.

Use the FileStream.GetAccessControl method to retrieve the ACL entries for a file.

An ACL describes individuals and/or groups who have, or do not have, rights to specific actions on the given file. For more information, see ACL Technology Overview and How to: Add or Remove an Access Control List Entry.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0