Looks for a file in directories
[path] = CL_path(name [,directories])
Looks for a file in a list of directories. Only the path of the first file found is returned.
If directories is absent, the variable %CL_PATH is used if it is defined. If %CL_PATH is not defined, the working directory is considered.
An error is raised if the file is not found.
Note : Wild card '*' can be used at the end of a directory to look in all sub-directories (only one level)
(string) Name of file to be looked for (1x1)
(string, optional) Directories to be searched (1xN) (default is %CL_PATH or '.'
(string) File path (1x1)
CNES - DCT/SB
dirlist = ['.', '/users/scripts', 'D:/data' , 'D:/data/*']; // Looks for script toto.sce in the given directories : CL_path('toto.sce', dirlist); // loads script using implicit directory list: %CL_PATH = ['.', '/users/scripts', 'D:/data']; exec(CL_path('toto.sce')); // Absolute file path: abs_path = fullpath(CL_path('toto.sce')) | ![]() | ![]() |