File manager limited to folders and files located in specific foldes on the disc
This preconfiguration can be activated when creating a new object (e.g. by "New object ..."
in the local object menu or after pressing the Insert
key after selecting the object) and is included in the group: " / Panels (PmaPanel) / Others examples"
This preconfiguration can be used with the objects: PmaFolder, PmaRoot, PmaPanel or PmaWorkspace.
The preconfiguration is created including the panel (object of the PmaPanel
type) is functional also a Web panel
The Preconfiguration creates the PmaPanel
object named "FileExplorer"
. The panel contains the PmgForm
object that is configured as file manager in the onFormLoad
event. The PmgWEdit
object allows viewing the content of some textových file types. The function buttons allow initiation of requested disc operation over the active (highlighted green) item/panel.
The Panel has the following methods:
CreateDir - for creating folders
DeleteDir - for deleting empty folders
DeleteFile - for deleting files
GetFromDir - returns a list of existing folders and files in requested folder
Init - defines the folder that will be used as root for file manager operations
MoveFile - for moving files
ViewFile - for viewing text files
In the Init
method the enabled root folders for the manager are set. This initialization setup is done in JSON
title - user description of the selected folder
path - path to selected folder
readonly - defines whether the folder (and its subfolders/files) are 1=read only, 0=reading and writing
subfolder - defines whether it is allowed to enter the subfoleders 1=yes, 0=no
File manager usage
Use the arrows or the mouse to select the file or folder. Doubleclick or Enter enters the subfolder. Doubleclick or Enter overt the text file view its content (if supported). The file operations represente by the buttons are executed on the active side of the manager indicated green.
These configurators can be set before the preconfiguration is created:
|The name of created object||Name of the object created in the tree of Pma objects. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics, empty string, spaces and the first character must not be a number.|
|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.