Worker file manager

1. Virtual directories

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.

1.1. Navigation in virtual directories

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).

Example:

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.

1.2. Creating virtual directories

Virtual directories can be created using several methods which are described in the following.

1.2.1. Possible data sources

1.2.2. Modifying existing virtual directories

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.