FileIOPermission settings are required for PowerScript system functions in Windows Forms targets.
For Web Forms targets, file-releated functions require Read, Write, Append and PathDiscovery permissions on the appname_root directory. For print-related functions, you must set the PrintingPermission value to AllPrinting, in addition to setting Read, Write, and PathDiscover permissions on the appname_root/print directory.
| System function | Permission required |
|---|---|
| AddToLibraryList,DirectoryExists , FileEncoding, FileExists, FileLength, FileLength64, FileRead, FileReadEx, FileSeek, FileSeek64, LibraryDirectory, LibraryDirectoryEx, LibraryExport, PrintBitmap, ProfileInt, ProfileString, SetProfileString, SetLibraryList, ShowHelp, ShowPopupHelp, and XMLParseFile | Read |
| FileWrite, FileWriteEx, RemoveDirectory, LibraryCreate, LibraryDelete, and LibraryImport | Write |
| FileDelete | Read and Write |
| FileOpen | When the FileAccess argument is Read!
|
| FileCopy (string s, string t) | Read for the source file (first) argument; Write for the target file (second) argument |
| FileMove (string s, string t) | Read and Write for the source file (first) argument; Write for the target file (second) argument |
| GetFolder | Unrestricted |
| GetCurrentDirectory | PathDiscovery for the current directory |
| CreateDirectory (string d) | Read for the parent directory; Write for the directory name argument |
| Object or control | Function or property | Permission required |
|---|---|---|
| Animation | AnimationName | Read |
| DataWindow | SaveAsAscii , SaveAsFormattedText , SavInk , SaveInkPicture | Write |
| ImportFile | Read permission if the (usually second) file name argument is supplied; if file name argument is empty or null, requires OpenSave FileDialogPermission and Unrestricted FileIOPermission | |
| SaveAs | Write permission if the (usually second) file name argument is supplied; if file name argument is empty or null, requires OpenSave FileDialogPermission and Unrestricted FileIOPermission | |
| DataWindow (RichText only) | InsertDocument | Read |
| DataStore | ImportFile | Read |
| SaveAs, SaveAsAscii , SaveAsFormattedText , SavInk , SaveInkPicture | Write | |
| DragObject | DragIcon property | Read |
| DropDownListBox, ListBox | DirList (string s, uint filetype) | Read and PathDiscovery for the file specification (first) argument |
| DropDownPictureListBox, PictureListBox | AddPicture, and PictureName property | Read |
| DirList (string s, uint filetype) | Read and PathDiscovery for the file specification (first) argument | |
| Graph | ImportFile | Read |
| SaveAs | Unrestricted for function with no arguments; Write on the file name (first) argument for function with arguments | |
| InkPicture | PictureFileName property | Read |
| LoadInk | Read and Write for the file (first) argument | |
| LoadPicture | Read for the file (first) argument | |
| Save, SaveInk | Write for the file (first) argument and for the current temporary file directory | |
| Listview | AddLargePicture, AddSmallPicture, AddStatePicture, and LargePictureName, SmallPictureName, StatePictureName properties | Read |
| Picture | PictureName property | Read |
| PictureButton | DisabledName, PictureName properties | Read |
| RichTextEdit | InsertDocument, InsertPicture | Read |
| SaveDocument | Write | |
| Treeview | AddPicture, AddStatePicture, and PictureName, StatePictureName properties | Read |
| UserObject | PictureName property | Read |
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="d:\test.txt;c:\demo.jpg" Write="c:\demo.jpg" />
<IPermission class="FileIOPermission" version="1" Read="MyWebApp_root;MyWebApp" Write="MyWebApp_root;MyWebApp" Append="MyWebApp_root;MyWebApp" PathDiscovery="MyWebApp_root;MyWebApp"/>