2%> Return a cell vector of MATLAB
string values each of
which
3%> corresponds to one **non-
default** file or folder path
4%> in the specified input directory path.<br>
7%> The primary use of
this function is to create a
list of items
8%> in a given folder
while excluding the
default system items
9%>
which includes the current and parent directories.<br>
11%> \param[in] path : The input scalar MATLAB
string or character containing the path to an
12%> existing directory whose file and folder contents should be listed,
13%> excluding the
default ``
"."`` and ``
".."`` system paths.<br>
14%> (**optional**,
default = ``
"."``)
17%> ``namelist`` : A MATLAB cell vector, each element of
which corresponds to an existing
18%> non-
default file or folder in the specified input directory path.<br>
19%> If the input path contains a base directory
name, the
name will
20%> be prefixed to each item in the output ``namelist``.<br>
21%> If the input `path` is not a directory or is empty,
22%> the output `namelist` will be empty.<br>
27%> namelist = pm.sys.path.list()
28%> namelist = pm.sys.path.list(path)
33%> \include{lineno} example/sys/path/
list/main.m
35%> \include{lineno} example/sys/path/
list/main.out.m
40%> \JoshuaOsborne, May 21 2024, 5:26 AM, University of Texas at Arlington<br>
41%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
42%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
43function namelist =
list(path)
49 [dirname, ~, ~] = fileparts(path);
50 fileSpecList = dir(path);
51 namelistRaw = string({fileSpecList.name});
52 namelistLen = length(namelistRaw);
53 cleanListLen = namelistLen - (any(strcmp(namelistRaw,
".")) + any(strcmp(namelistRaw,
"..")));
54 if cleanListLen == namelistLen
55 namelist = fullfile(dirname, namelistRaw);
57 namelist = strings([cleanListLen, 1]);
59 for i = 1 : namelistLen
60 if ~(strcmp(namelistRaw(i),
".") || strcmp(namelistRaw(i),
".."))
61 counter = counter + 1;
62 namelist(counter) = fullfile(dirname, namelistRaw(i));
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared library directories.
function list()
Return a list of MATLAB strings containing the names of OS platforms supported by the ParaMonte MATLA...
function which(in vendor)
Return the a MATLAB string containing the path to the first mpiexec executable binary found in system...