FileIOPermissionAttribute.Read Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets read access for the file or directory specified by the string value.
public:
property System::String ^ Read { System::String ^ get(); void set(System::String ^ value); };
public string Read { get; set; }
member this.Read : string with get, set
Public Property Read As String
Property Value
The absolute path of the file or directory for read access.
Examples
The following example sets the Read property to grant Read access to files in the specified directory.
// Set the Read property.
[FileIOPermissionAttribute(SecurityAction::PermitOnly,Read="C:\\")]
// Set the Read property.
[FileIOPermissionAttribute(SecurityAction.PermitOnly, Read = "C:\\")]
' Set the Read, PathDiscovery, Append, Write, and All properties.
<FileIOPermissionAttribute(SecurityAction.PermitOnly, Read:="C:\"), _
FileIOPermissionAttribute(SecurityAction.PermitOnly, _
PathDiscovery:="C:\Documents and Settings\All Users"), _
FileIOPermissionAttribute(SecurityAction.PermitOnly, _
Append:="C:\Documents and Settings\All Users\Application Data"), _
FileIOPermissionAttribute(SecurityAction.PermitOnly, _
Write:="C:\Documents and Settings\All Users\Application Data\Microsoft"), _
FileIOPermissionAttribute(SecurityAction.PermitOnly, _
All:="C:\Documents and Settings\All Users\Application Data\Microsoft\Network")> _
Public Shared Sub PermitOnlyMethod()
Remarks
This property sets access for a single file or directory. Use additional attributes to specify additional files and directories.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET