Module path_state

Module path_state 

Source
Expand description

Session-wide MATLAB path state shared between the path builtin and filesystem helpers such as exist or which.

The MATLAB search path is represented as a single platform-specific string using the same separator rules that MathWorks MATLAB applies (; on Windows, : everywhere else). RunMat keeps the current working directory separate from this list so callers can freely replace or manipulate the path without losing the implicit pwd entry that MATLAB always prioritises.

Constants§

PATH_LIST_SEPARATOR
Platform-specific separator used when joining MATLAB path entries.

Functions§

current_path_segments
Split the current MATLAB path string into individual entries, omitting empty segments and trimming surrounding whitespace.
current_path_string
Return the current MATLAB path string (without the implicit current directory entry).
set_path_string
Replace the MATLAB path string for the current session. When new_path is empty the session path becomes empty and the RUNMAT_PATH environment variable is removed.