static void TextFile_TreeNood_Demo(Args _args)
{
AsciiIO tmpfile;
Filename tmpfilename;
FileIOPermission permission;
#File
#AOT
TreeNode treeNode;
TreeNode treeNodeTables = TreeNode::findNode(#SecurityKeysPath);
tmpfilename = WinApi::getTempFilename(WinAPI::getTempPath(),'SecurityKey');
permission = new FileIOPermission(tmpfilename,#IO_write);
permission.assert();
tmpfile = new AsciiIO(tmpfilename, #IO_write);
if(tmpfile.status()==IO_Status::Ok)
{
tmpfile.outRecordDelimiter('\n');
tmpfile.outFieldDelimiter(';');
}
else
{
return;
}
while (treeNode != null)
{
tmpfile.write(strfmt('Name: %1, ID: %2',treeNode.AOTname(), treeNode.applObjectId())); /
}
tmpfile = null;
CodeAccessPermission::revertAssert();
}
{
AsciiIO tmpfile;
Filename tmpfilename;
FileIOPermission permission;
#File
#AOT
TreeNode treeNode;
TreeNode treeNodeTables = TreeNode::findNode(#SecurityKeysPath);
tmpfilename = WinApi::getTempFilename(WinAPI::getTempPath(),'SecurityKey');
permission = new FileIOPermission(tmpfilename,#IO_write);
permission.assert();
tmpfile = new AsciiIO(tmpfilename, #IO_write);
if(tmpfile.status()==IO_Status::Ok)
{
tmpfile.outRecordDelimiter('\n');
tmpfile.outFieldDelimiter(';');
}
else
{
return;
}
while (treeNode != null)
{
tmpfile.write(strfmt('Name: %1, ID: %2',treeNode.AOTname(), treeNode.applObjectId())); /
}
tmpfile = null;
CodeAccessPermission::revertAssert();
}
No comments:
Post a Comment