what
- : what ¶
- : what
folder¶ - :
s =what(folder)¶ List the code and data files of a folder.
Without argument the current folder is listed. folder is an existing folder, given by its absolute path or relative to the current folder, or the partial path of a folder below a folder of the search path. Without output the files are printed, grouped by kind.
With an output, s is a structure array with one element for each folder found, which has the fields
paththe absolute path of the folder,
mmatmexnxomdlslxpsorted column cell arrays with the names of the M-files, MAT-files, MEX-files, compiled object files, model files and P-files,
classesclass folder names without the leading ‘@’ (MATLAB R2026a),
packagespackage folder names without the leading ‘+’ (MATLAB R2026a).
When no folder is found, s is an empty structure array of size 0-by-1 with the same fields.