Worker supports a special concept of so-called "virtual directories". Such virtual directories do not represent real directories, but instead contains file system entries from any location. Basically it creates a new view of the file system containing only selected elements.
For instance, a virtual directory can be all search results for a given query. You could find some files with a special pattern, put all results into a virtual directory, and later add result from a second search command to that virtual directory. Then you can access those files, copy them, delete some of them, or call external programs, basically whatever is appropriate for your use-case.
The file names shown in the list view are paths relative to the base directory (which is the common prefix of all entries in the virtual directory). The image on the right shows an example of a virtual directory from a search operation.
A virtual directory can be identified by the path name, it does not start with a slash but some other identifier and a colon. For example, if it comes from search results, it starts with "searchX:".
Virtual directories are a different concept than the virtual file system which is used to access archives, remote file systems etc.
When navigating a virtual directory, the left and right keys for entering the parent or current directory, respectively, behaves slightly different. Pressing the right cursor key will refine the virtual directory to contain only those entries that are in the same base directory as the active element. The left cursor key will go to the parent directory but staying in the virtual directory if possible. This method allows to navigate through virtual directories even if only files are visible (from multiple, different directories).
This picture shows the panelized path jump entries. When pressing the right cursor key, the view will change to the content shown in the next picture:
Only those elements are visible which start with the "home" directory. Since the resulting elements are all located in the "Downloads" directory, the new virtual directory directly shows this directory as a path.
When pressing the left cursor key, Worker will not change into "/home/ralf" which would be the direct parent directory, but instead change back to the previous virtual directory which contains all elements.
Virtual directories can be created using several methods which are described in the following.
- the results from a search operation can be "panelized", meaning all results will be put into a virtual directory.
- the path jump command ca be used to access often used entries. When applying a filter, the remaining entries can also be "panelized" into a virtual directory.
- the registered command "flatten_dir" can be used to create a virtual directory containing all files in all sub-directory. When called (for example via the command menu, all files are recursively gathered and stored in a new virtual directory.
- the registered command "vdir_from_selected" can be used to create a virtual directory containing all selected entries of the current directory.
It is also possible to add more entries to a virtual directory by calling the registered command "vdir_add_selected_from_other_side". It will get all selected entries from the inactive panel and add them to the current virtual directory.
This feature is helpful when, for example, multiple search results should be merged. To do so, both search results must be panelized. Then, all results are selected, and in the other panel showing the other results, this function is called to merge both virtual directories.