FileIOPermission
FileIOPermission settings are required for PowerScript system functions in Windows Forms targets.
Permission requirements for Windows Forms
| 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!
When the FileAccess argument is Write!
|
| 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 |
This table shows the required FileIOPermission settings for object and control functions in Windows Forms targets.
| 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 |
Example 1
This XML example gives Read access to two files and write access to one of those files:
|
1 |
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="d: est.txt;c:demo.jpg" Write="c:demo.jpg" /> |
Parent topic: Custom Permission Settings
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest