Export AOT TreeNode to the disk
Using x++ code export AOT's Jobs path treenode to the disk
wrote by Jimmy on DEC.5th 2010
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
static void Jimmy_ExportTreeNode(Args _args)
{
TreeNode treeNode;
TreeNode childNode;
FileIoPermission perm;
#define.ExportFile2(@"c:\Jimmy_Tables.xpo")
#define.ExportFile(@"c:\Jobs.xpo")
#define.ExportMode("w")
#AOT
#WINAPI
;
perm = new FileIoPermission(#ExportFile, #ExportMode);
if (perm == null)
return;
perm.assert();
treeNode = TreeNode::findNode(#JobsPath);
if (treeNode != null)
{
childNode = treeNode.AOTfindChild(@"Jimmy_Tables");
if(childNode)
childNode.treeNodeExport(#ExportFile2);
treeNode.treeNodeExport(#ExportFile);//export to all #JobsPath .xpo
}
WINAPI::copyFile(#ExportFile,strfmt("%1%2%3 %4 %5.xpo",
WinAPI::getFolderPath(#CSIDL_Personal),//my document
"\\",
systemdateget(),
winAPI::getUserName(),
"Jobs"),true);
WINAPI::deleteFile(#ExportFile);
CodeAccessPermission::revertAssert();
}