MATLAB Runtime Server | ![]() ![]() |
List all files in directories on the current path
Syntax
Description
[w,wc,wp] = dirlist
returns three structure arrays containing information about all of the directories on the path and in the current directory. Each structure array (w, wc, and wp
) has the same fields as the structure array produced by the MATLAB what
command.
w
provides this information for every standard directory on the path and in the current directory. wc
provides this information for every class directory on the path and in the current directory. wp
provides this information for every private directory on the path and in the current directory.
The length of w
is the same as the number of standard directories, the length of wc
is the same as the number of class directories, and the length of wp
is the same as the number of private directories.
Example
To see the dirlist
information for private directories on the path, look at wp
. The output shown below is for a typical MATLAB installation.
This means that there are 14 private directories on the path and in the current directory. To see what the third one is, type
wp(3) ans = path: 'c:\matlab\toolbox\matlab\uitools\private' m: {12x1 cell} mat: { 2x1 cell} mex: { 1x1 cell} mdl: {} p: {12x1 cell} classes: {}
The directory is toolbox\matlab\uitools\private, and it contains 12 M-files, 2 MAT-files, 1 MEX-file, and 12 P-files. There are no Simulink model files or class directories in the uitools\private directory. To see the MAT-files in uitools\private, look at wp(3).mat
.
See Also
![]() | depfun | inmem | ![]() |