Engee path editor
The Search Path (hereafter path) is a list of directories in which Engee will search for files unless an absolute path is specified. You can modify the directory list using the Engee path editor.
Path editor - is a tool that allows you to specify a list of directories in which to search for files. The editor works according to the following algorithm:
-
Get the name of the file to be searched;
-
Check the current catalogue:
-
2.1. If the file is found, end the search;
-
2.2. If the file is not found, go to the next catalogue;
-
-
Repeat step 2 until the file is found or the search directories run out;
-
If the file is not found in any catalogue, terminate the process with a message that the file is not found.
Configuring paths
The path can be configured in file browser Engee :
-
Right click on the desired directory and select Add to path:
-
Click on the three-dot icon and from the menu that appears, select *Set path*to open the path editor:
In the path editor, you can:
-
- add a folder to the path;
-
- add a folder together with subfolders to the path;
Folders added to the path are coloured blue. -
- move the selected path to the beginning of the list;
-
- move the selected path one position higher;
-
- move the selected path one position lower;
-
- move the selected path to the end of the list;
-
- delete the selected path from the editor.
Paths in Engee commands
The Engee programme control and Julia language commands can also use directories specified through the path editor to locate files. This means that if an absolute path to a file is not specified, the commands will look for it in directories added to the path.
For example, there is a model file my_model.engee
that is deep in the project directory. Instead of writing an absolute path to this file, you can add the path to this file via the path editor and just specify the file name:
engee.open("my_model")
In Engee, path management is based on the Julia language environments, implemented using LOAD_PATH and JULIA_LOAD_PATH:
-
LOAD_PATH
is an array of paths used by Julia to find packages and modules needed to run a project or application. -
JULIA_LOAD_PATH
is an environment variable containing the paths to the folders where Julia searches for packages.
Understanding how they work allows you to effectively manage paths and provide access to the right packages and modules (see Working with Julia packages).