Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FileIOPermission.AllLocalFiles Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the permitted access to all local files.

Namespace:   System.Security.Permissions
Assembly:  mscorlib (in mscorlib.dll)

public FileIOPermissionAccess AllLocalFiles { get; set; }

Property Value

Type: System.Security.Permissions.FileIOPermissionAccess

The set of file I/O flags for all local files.

Local files are files contained on the local computer. Any files not accessed through a network drive are local files.

An individual FileIOPermissionAccess value can be checked for using a bitwise AND operation.

The following code example shows the use of the AllLocalFiles property.

FileIOPermission f = new FileIOPermission(PermissionState.None);
f.AllLocalFiles = FileIOPermissionAccess.Read;
try
{
    f.Demand();
}
catch (SecurityException s)
{
    Console.WriteLine(s.Message);
}

.NET Framework
Available since 1.1
Return to top
Show:
© 2018 Microsoft