This documentation is archived and is not being maintained.
FileIOPermission.new Method [AX 2012]
Initializes a new instance of the CodeAccessPermission class.
public void new(str filename, str mode)
Run On
Called
Parameters
-
filename
- Type: str
A String data type that specifies the name of a file or folder.
-
mode
- Type: str
A String data type that specifies the type of access.
The following table lists the possible values for the _mode parameter.
|
R
|
Read
|
|
W
|
Write
|
|
RW
|
Read and write
|
The following code example shows a new instance of the FileIoPermission class that specifies read access for the File.txt file.
server static void main(Args args)
{
FileIoPermission _perm;
_perm = new FileIoPermission("c:\\File.txt",'r');
}