<< diff_file files and folders functions fileparts >>

dir


Returns file list.


Syntax


dir
dir(dirname)
dir(dirname, '-s')
res =dir()
res = dir(dirname)
res = dir(dirname, '-s')

Input argument


dirname

a string: file or directory name.

'-s'

a string: scan also subdirectories.

Output argument


res

a struct with fields: name, date, bytes, isdir, datenum.

Description


dir displays the list of files and folders in the current folder.

* (wildcard) is supported in filename and path name.

Example


res = dir(nelsonroot())
res = dir(nelsonroot(), '-s')

See also


isdir, isfile.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< diff_file files and folders functions fileparts >>