Skip to Main Content Skip to Search
Product Documentation

dir - Files and folders in current IDE window

Syntax

IDE_Obj.dir
d=IDE_Obj.dir

IDEs

This function supports the following IDEs:

Description

IDE_Obj.dir lists the files and folders in the IDE working folder, where IDE_Obj is the object that references the IDE. IDE_Obj can be either a single object, or a vector of objects. When IDE_Obj is a vector, dir returns the files and folders referenced by each object.

d=IDE_Obj.dir returns the list of files and folders as an M-by-1 structure in d with the fields for each file and folder shown in the following table.

Field NameDescription
nameName of the file or folder.
dateDate of most recent file or folder modification.
bytesSize of the file in bytes. Folders return 0 for the number of bytes.
isdirectory0 if it is a file, 1 if it is a folder.
datenumThe Eclipse IDE and Code Composer Studio IDE also return the modification date as a MATLAB serial date number.

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

See Also

cd | open

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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