dir - Files and directories in current IDE window

Syntax

dir(id)
d=dir(id)

Description

dir(id) lists the files and directories in the IDE working directory, where id is the object that references the IDE. id can be either a single handle, or a vector of handles. When id is a vector, dir returns the files and directories for each handle.

d=dir(id) returns the list of files and directories as an M-by-1 structure in d with the following fields for each file and directory, as shown in the following table.

Field NameDescription
nameName of the file or directory.
dateDate of most recent file or directory modification.
bytesSize of the file in bytes. Directories return 0 for the number of bytes.
isdirectory0 if this is a file, 1 if this is a directory.

To view the entries in d, use an index in the command at the MATLAB® prompt, as shown by the following examples.

See Also

cd

open

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS