Name
FileIOPermissionAttribute
Synopsis
public sealed class FileIOPermissionAttribute : CodeAccessSecurityAttribute {
// Public Constructors
public FileIOPermissionAttribute(SecurityAction action
);
// Public Instance Properties
public string All{set; get; }
public string Append{set; get; }
public string PathDiscovery{set; get; }
public string Read{set; get; }
public string Write{set; get; }
// Public Instance Methods
public override IPermission CreatePermission( );
// overrides SecurityAttribute
}
FileIOPermissionAttribute
provides declarative
syntax support for the FileIOPermission
class. The
All
, Append
,
PathDiscovery
, Read
, and
Write
properties take the full pathname of the
file or folder to which access of the appropriate level is granted.
Each property represents access as defined by the
FileIOPermissionAccess
enumeration member of the
same name. Unlike FileIOPermission
, a
FileIOPermissionAttribute
can only represent
access of each type to a single file or folder; apply multiple
attributes to a program element in order to specify access to more
than one. Setting Unrestricted
to true represents
full access to all files and folders.
Hierarchy
System.Object
→
System.Attribute
→
SecurityAttribute
→
CodeAccessSecurityAttribute
→
FileIOPermissionAttribute
Valid On
Assembly, Class, Struct, Constructor, Method
Get Programming .NET Security now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.