/usr/share/freemat/help/text/dir.mdc is in freemat-help 4.0-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | DIR DIR List Files Function
Usage
In some versions of FreeMat (pre 3.1), the dir function was aliased
to the ls function. Starting with version 3.1, the dir function
has been rewritten to provide compatibility with MATLAB. The general syntax
for its use is
dir
in which case, a listing of the files in the current directory are output to the
console. Alternately, you can specify a target via
dir('name')
or using the string syntax
dir name
If you want to capture the output of the dir command, you can assign the output
to an array
result = dir('name')
(or you can omit 'name' to get a directory listing of the current directory. The
resulting array result is a structure array containing the fields:
- name the filename as a string
- date the modification date and time stamp as a string
- bytes the size of the file in bytes as a uint64
- isdir a logical that is 1 if the file corresponds to a directory.
Note that 'name' can also contain wildcards (e.g., dir *.m to get a listing of
all FreeMat scripts in the current directory.
|