QM  6.1.1
Model-Based Design Tool
Loading...
Searching...
No Matches
Working with Directories

Code EngineeringWorking with Files

QM™ provides special directory items to represent directories on the disk. These directory items can be added to the model item, to any package item, as well as to other directory item in which case you can create nested directories.

Adding a New Directory

To add a new directory item, in the Model Explorer right-click on the model item, a package item, or directory item and select the "Add Directory" in the popup menu, as shown below:

Adding directory item to the model item

Directory Property Sheet

The only editable attribute in the Directory Property Sheet is the path relative to the QM Model File.

Directory Item Property Sheet

Setting the Directory Path

Directories Inside the Model or a Package

The path of a directory nested directly inside the model item is relative to the location of the model file on your disk. The path of a directory nested inside a package item is:

In any case, the directory path is always relative. This relative path can contain the usual relative path symbols, such as the current model directory, denoted as . (dot), parent directory of the model as .. (dot-dot), etc. The following table shows some examples of the relative paths for the model-level or package-level directory items:

Directory Path Example Path (Windows) Path (Unix)
the model directory . .
subdirectory code of the model directory code code
parent directory of the model directory .. ..
sibling directory proj of the model directory ..\proj ../proj
Note
The directory path can use the native directory separator on the platform where QM™ runs, such as \ (backslash) on Windows and / (forward slash) on Linux. Alternatively, on any platform the directory path can use the / (forward slash) directory separator.

Nested Directories

The path of a directory nested inside another directory item is simply the name of that directory, while the natural nesting of the directory items in the model determines the nesting of the directories created on the disk.

Note
The path of a directory nested inside a directory cannot contain directory separators or any relative path symbols, like . or ...

For example, the following screen shot shows directories subproj1 and subproj2 nested inside the directory ..\proj. Please note that the path of the package-scope directory ..\proj is relative to the model file on the disk, while the paths of subproj1 and subproj2 are simply the names of these directories.

Nested directories inside a project-scope directory

Drag-and-Drop

Once you have some directory items added to your model, you can use the drag-and-drop support in the Model Explorer to move the directory items from one allowed location to another in the Model Explorer tree view.

Code EngineeringWorking with Files