Files
2026-06-04 11:42:34 +02:00

235 lines
8.3 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace System.Security.Permissions
{
/// <summary>Allows security actions for <see cref="T:System.Security.Permissions.FileIOPermission" /> to be applied to code using declarative security. This class cannot be inherited.</summary>
// Token: 0x02000546 RID: 1350
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
[ComVisible(true)]
[Serializable]
public sealed class FileIOPermissionAttribute : CodeAccessSecurityAttribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Permissions.FileIOPermissionAttribute" /> class with the specified <see cref="T:System.Security.Permissions.SecurityAction" />.</summary>
/// <param name="action">One of the <see cref="T:System.Security.Permissions.SecurityAction" /> values. </param>
/// <exception cref="T:System.ArgumentException">The <paramref name="action" /> parameter is not a valid <see cref="T:System.Security.Permissions.SecurityAction" />. </exception>
// Token: 0x06003168 RID: 12648 RVA: 0x000AA5C0 File Offset: 0x000A87C0
public FileIOPermissionAttribute(SecurityAction action)
: base(action)
{
}
/// <summary>Gets or sets full access for the file or directory that is specified by the string value.</summary>
/// <returns>The absolute path of the file or directory for full access.</returns>
/// <exception cref="T:System.NotSupportedException">The get method is not supported for this property.</exception>
// Token: 0x170009A5 RID: 2469
// (get) Token: 0x06003169 RID: 12649 RVA: 0x000AA5CC File Offset: 0x000A87CC
// (set) Token: 0x0600316A RID: 12650 RVA: 0x000AA5D8 File Offset: 0x000A87D8
[Obsolete("use newer properties")]
public string All
{
get
{
throw new NotSupportedException("All");
}
set
{
this.append = value;
this.path = value;
this.read = value;
this.write = value;
}
}
/// <summary>Gets or sets append access for the file or directory that is specified by the string value.</summary>
/// <returns>The absolute path of the file or directory for append access.</returns>
// Token: 0x170009A6 RID: 2470
// (get) Token: 0x0600316B RID: 12651 RVA: 0x000AA5F8 File Offset: 0x000A87F8
// (set) Token: 0x0600316C RID: 12652 RVA: 0x000AA600 File Offset: 0x000A8800
public string Append
{
get
{
return this.append;
}
set
{
this.append = value;
}
}
/// <summary>Gets or sets the file or directory to which to grant path discovery.</summary>
/// <returns>The absolute path of the file or directory.</returns>
// Token: 0x170009A7 RID: 2471
// (get) Token: 0x0600316D RID: 12653 RVA: 0x000AA60C File Offset: 0x000A880C
// (set) Token: 0x0600316E RID: 12654 RVA: 0x000AA614 File Offset: 0x000A8814
public string PathDiscovery
{
get
{
return this.path;
}
set
{
this.path = value;
}
}
/// <summary>Gets or sets read access for the file or directory specified by the string value.</summary>
/// <returns>The absolute path of the file or directory for read access.</returns>
// Token: 0x170009A8 RID: 2472
// (get) Token: 0x0600316F RID: 12655 RVA: 0x000AA620 File Offset: 0x000A8820
// (set) Token: 0x06003170 RID: 12656 RVA: 0x000AA628 File Offset: 0x000A8828
public string Read
{
get
{
return this.read;
}
set
{
this.read = value;
}
}
/// <summary>Gets or sets write access for the file or directory specified by the string value.</summary>
/// <returns>The absolute path of the file or directory for write access.</returns>
// Token: 0x170009A9 RID: 2473
// (get) Token: 0x06003171 RID: 12657 RVA: 0x000AA634 File Offset: 0x000A8834
// (set) Token: 0x06003172 RID: 12658 RVA: 0x000AA63C File Offset: 0x000A883C
public string Write
{
get
{
return this.write;
}
set
{
this.write = value;
}
}
/// <summary>Gets or sets the permitted access to all files.</summary>
/// <returns>A bitwise combination of the <see cref="T:System.Security.Permissions.FileIOPermissionAccess" /> values that represents the permissions for all files. The default is <see cref="F:System.Security.Permissions.FileIOPermissionAccess.NoAccess" />.</returns>
// Token: 0x170009AA RID: 2474
// (get) Token: 0x06003173 RID: 12659 RVA: 0x000AA648 File Offset: 0x000A8848
// (set) Token: 0x06003174 RID: 12660 RVA: 0x000AA650 File Offset: 0x000A8850
public FileIOPermissionAccess AllFiles
{
get
{
return this.allFiles;
}
set
{
this.allFiles = value;
}
}
/// <summary>Gets or sets the permitted access to all local files.</summary>
/// <returns>A bitwise combination of the <see cref="T:System.Security.Permissions.FileIOPermissionAccess" /> values that represents the permissions for all local files. The default is <see cref="F:System.Security.Permissions.FileIOPermissionAccess.NoAccess" />.</returns>
// Token: 0x170009AB RID: 2475
// (get) Token: 0x06003175 RID: 12661 RVA: 0x000AA65C File Offset: 0x000A885C
// (set) Token: 0x06003176 RID: 12662 RVA: 0x000AA664 File Offset: 0x000A8864
public FileIOPermissionAccess AllLocalFiles
{
get
{
return this.allLocalFiles;
}
set
{
this.allLocalFiles = value;
}
}
/// <summary>Gets or sets the file or directory in which access control information can be changed.</summary>
/// <returns>The absolute path of the file or directory in which access control information can be changed.</returns>
// Token: 0x170009AC RID: 2476
// (get) Token: 0x06003177 RID: 12663 RVA: 0x000AA670 File Offset: 0x000A8870
// (set) Token: 0x06003178 RID: 12664 RVA: 0x000AA678 File Offset: 0x000A8878
public string ChangeAccessControl
{
get
{
return this.changeAccessControl;
}
set
{
this.changeAccessControl = value;
}
}
/// <summary>Gets or sets the file or directory in which access control information can be viewed.</summary>
/// <returns>The absolute path of the file or directory in which access control information can be viewed.</returns>
// Token: 0x170009AD RID: 2477
// (get) Token: 0x06003179 RID: 12665 RVA: 0x000AA684 File Offset: 0x000A8884
// (set) Token: 0x0600317A RID: 12666 RVA: 0x000AA68C File Offset: 0x000A888C
public string ViewAccessControl
{
get
{
return this.viewAccessControl;
}
set
{
this.viewAccessControl = value;
}
}
/// <summary>Gets or sets the file or directory in which file data can be viewed and modified.</summary>
/// <returns>The absolute path of the file or directory in which file data can be viewed and modified.</returns>
/// <exception cref="T:System.NotSupportedException">The get accessor is called. The accessor is provided only for C# compiler compatibility.</exception>
// Token: 0x170009AE RID: 2478
// (get) Token: 0x0600317B RID: 12667 RVA: 0x000AA698 File Offset: 0x000A8898
// (set) Token: 0x0600317C RID: 12668 RVA: 0x000AA6A0 File Offset: 0x000A88A0
public string ViewAndModify
{
get
{
throw new NotSupportedException();
}
set
{
this.append = value;
this.path = value;
this.read = value;
this.write = value;
}
}
/// <summary>Creates and returns a new <see cref="T:System.Security.Permissions.FileIOPermission" />.</summary>
/// <returns>A <see cref="T:System.Security.Permissions.FileIOPermission" /> that corresponds to this attribute.</returns>
/// <exception cref="T:System.ArgumentException">The path information for a file or directory for which access is to be secured contains invalid characters or wildcard specifiers. </exception>
// Token: 0x0600317D RID: 12669 RVA: 0x000AA6C0 File Offset: 0x000A88C0
public override IPermission CreatePermission()
{
return null;
}
// Token: 0x04001431 RID: 5169
private string append;
// Token: 0x04001432 RID: 5170
private string path;
// Token: 0x04001433 RID: 5171
private string read;
// Token: 0x04001434 RID: 5172
private string write;
// Token: 0x04001435 RID: 5173
private FileIOPermissionAccess allFiles;
// Token: 0x04001436 RID: 5174
private FileIOPermissionAccess allLocalFiles;
// Token: 0x04001437 RID: 5175
private string changeAccessControl;
// Token: 0x04001438 RID: 5176
private string viewAccessControl;
}
}