fileList
File list of given directories with a given extension name
Contents
Syntax
- opt=fileList('defaultOpt');
- list=fileList(directoryList, opt)
Description
fileList(directoryList, opt) returns all the files with the given directory (or directory list) according to the give options opt.
- opt.extName: Extension names of the returned files.
- opt.maxFileNumInEachDir: Max. no. of files of each directory to be returned.
- opt.mode: 'recursive' or 'nonRecursive'
The default options can be obtain via "opt=fileList('defaultOpt')".
Example
opt=fileList('defaultOpt'); opt.extName='m'; opt.maxFileNumInEachDir=1; opt.mode='recursive'; data=fileList([matlabroot, '/toolbox/matlab'], opt)
data = 880×1 struct array with fields: name folder date bytes isdir datenum path parentDir