<< CL_isAlmostEqual Utilities CL_plot_earthMap >>

celestlab >> Utilities > CL_path

CL_path

File paths (search in selected directories)

Calling Sequence

paths = CL_path(names [[, directories, opt, err, hid, maxdepth, smode, ftype]])

Description

Parameters

names:

(string) Name(s) of file(s) to be looked for (may contain wildcards). (1xN)

directories:

(string, optional) Directories to be searched. Default is "", meaning %CL_PATH if it exists (1xP)

opt:

(string, optional) Search option: "first" (or "std") or "all". Default is "first" (1x1)

err:

(boolean, optional) %t is an error is raised if no file is found. Default is %t except if opt == "all" (1x1)

hid:

(boolean, optional) %t if hidden sub-directories are included in the search. Default is %f (1x1)

maxdepth:

(integer >=0, optional) Maximum depth for the search. Default is 50 (1x1)

smode:

(string, optional) Search smode: "df" or "bf". Default is "bf" (1x1)

ftype:

(string, optional) Type of files: "d" or "f" or "any". Default is "any" (1x1)

paths:

(string) File path(s) or [] if no file is found (1xQ)

Authors

Examples

// Looks for "readme.txt" in CL_home() - returns the first file found
CL_path("readme.txt", CL_home())

// Returns all "*.scd" file in "data" (deep search)
CL_path("*.scd", fullfile(CL_home(), "data"), "all")

Report an issue
<< CL_isAlmostEqual Utilities CL_plot_earthMap >>