FileIOPermission::AllLocalFiles Property

 

Gets or sets the permitted access to all local files.

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

public:
property FileIOPermissionAccess AllLocalFiles {
	FileIOPermissionAccess get();
	void set(FileIOPermissionAccess value);
}

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 = gcnew 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: