Project Paths

The key to the project structure is the path used to identify the files in a project—the project path. The project path is used within scripts to describe the location of project resources. This project path is based on the project root and is self-contained, which allows for portability. The project root is a system path where the project is stored. For example:

On Windows: e:\di\projects\sales

On Linux: \di\projects\sales

After the project is created, the path to files within the project is stated relative to the project root. The project root is represented by a forward slash ("/"). For example:

/cbases/sales.cbase

is combined with the root to get the actual location of the file on disk.

For example, the above project path to sales.cbase gets interpreted as:

e:\di\projects\sales\cbases\sales.cbase.

After a project is established, the root on the server is not important, since the Workbench project root is simply "/" and all project paths are then relative to this root.

In prior versions of the Diver Solution, these paths were often relative paths. The table that follows shows a comparison of the paths used in the earlier (6.x) versions of the Diver Solution software and in Workbench (7.x).

Implementation Example Description
6.x (before Workbench) ../data/sales.txt Relative paths, where the "../" directs up one directory.
7.x (Workbench) /data/sales.txt Project paths, where the project root is represented by the forward slash ("/") and all other files are relative to the project root.

To work with content from before 7.x, there are two special virtual projects. See Special 6.4 Virtual Projects for information on working with older content inside Workbench.

NOTE: To copy a project, use the New Project dialog box. See Copying a Project.