File manager limited to folders and files located in specific folders on the disk
This preconfiguration can be activated when creating a new object (e.g. by
"New object ..." in the context menu of the object or by pressing the
Insert key after selecting the object).
This preconfiguration is included in the
"/ Panels (PmaPanel) / Others examples" group.
This preconfiguration can be created in the
PmaFolder,
PmaRoot,
PmaPanel,
PmaWorkspace or
PmaPrototype object.
The preconfiguration is created including the panel (object of the
PmaPanel type) is functional also as
Web panel.
The preconfiguration creates an object of the
PmaPanel type named
"FileManager".
The panel contains the
PmgForm object that is configured as 2 panel file manager in the
onFormLoad event.
The function buttons allow initiation of requested disc operation over the active (highlighted green) item/panel.
The panel has the following methods:
CopyFile - for copying files
CreateDir - for creating folders
DeleteDir - for deleting empty folder
DeleteFile - for deleting files
GetFromDir - returns a list of existing folders and files in requested folder
Init - defines folders that will be used as root for file manager operations
MoveFile - for moving files
In the
"Init" method the enabled root folders for left and right side of the manager are set. This initialization setup is done in the
JSON format:
title - user description of the selected folder
path - path to selected folder
readonly - specifies whether the folder (and its subfolders and files) are 1=read only, 0=for read and write
subfolder - specifies whether it is allowed to enter the subfolders. 1=yes, 0=no.
File manager control:
Use the arrows or the mouse to select the file or folder on both sides of the manager.
By left mouse button double-clicking or by the
Enter key enters the subfolder.
The file operations represente by the buttons are executed on the active side of the manager indicated green.
Manager limitations:
- It is possible to delete or copy only individual files.
- The folder can be deleted only if it is empty.
These configurators can be set before the preconfiguration is created:
The name of created object | Name of the object created in the Pma object tree.
The maximum name length is 30 characters.
This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and first character must not be a number.
Default: "FileManager" |
|
Enable as Web component | Specifies whether this object has to be registered as a Web server component
After the preconfiguration is created, the "PmaPanel > Web server > Enable as Web component" configurator will be set to this value. |
---|