Using a Master File List

You can use a Master File List to control what source files are in a project. The Master File List is a text file con­taining the names of each file or directory in the project. To use it, select Project > Project Settings and enable the Master File List setting.

Although the Master File List (MFL) controls what files are in your project, you can still add or remove files manually by using Project > Add and Remove Files. When you add or remove a file from your project, the change will be saved to the MFL. If the MFL contains a file that is not in your project, then it will get added automatically to your project. If the MFL does not contain a file that is in your project, then it will be removed from your project automatically.

The Master File List can be a part of your source code repository and shared with other people. It is a simple text file that lists all the files (and/or directories) in your project. The MFL is maintained as you add or remove files from your project. If you add or remove files, the changes are saved to the MFL, and when the MFL is pushed out or checked in, your team members will get the additions or deletions automatically as their Source Insight syncs up with the MFL.

Master File List Format

Each line in the Master File List should contain a path relative to your project's source directory. It can be a simple file name, a wildcard, such as open*.c, or a directory name.

If a line item is a directory name, then all the files that match known file types in the directory are included in the project. Sub-directories and their contents are not included.

Lines that begin with the semi-colon (;) character are comments.

Here is an example:

; Source Insight Project File List

; Project Name: WorkTest

; Generated by Source Insight 4.00.0048 at 11/19/2015 1:41:06 PM

; Version=4.00.0048


; Each line should contain either a file name, a wildcard, or a sub-directory name.

; File paths are relative to the project source root directory.










The example above uses a combination of specific file names, wildcards, and a directory name (devices). All the names are relative to the project source directory root.

Generating a Master File List

If you already have a project built and you would like to use a Master File List, select Project > Export Project File List to create a new file list. Select Project > Project Settings and specify the file list in the Master File List Path section.

Editing the Master File List

You can edit the Master File List directly by selecting Project > Open Project Master File List. Normally you would not need to edit it because Source Insight changes it automatically as you add and remove files from your project. However, you are free to edit it. When you save the file, Source Insight will resynchronize the project with the new version of the Master File List.

Synchronizing with the Master File List

Source Insight periodically checks to see if the Master File List has changed on disk. It resynchronizes with it when a change is detected. This can cause new files to be added to the project, or files to be removed from the project. This is handy if your Master File List is part of your source code repository. For example, if a col­league adds a new file to the project, when you get a new version of the repository, the new source file will be automatically added to your Source Insight project.