Main Content

getFullFileList

Get list of files from build information

Description

[fPathNames,names] = getFullFileList(buildinfo,fcase) returns the fully qualified paths and names of files, or files of a selected type (source, include, or nonbuild), from the build information.

To ensure that header files are added to the file list (for example, header files in the _sharedutils folder), run findIncludeFiles before getFullFileList.

The packNGo (Simulink Coder) function calls getFullFileList to return a list of files in the build information before processing files for packaging.

The makefile for the build resolves file locations based on source paths and rules. The build process does not require you to resolve the path of every file in the build information. The getFullFileList function returns the path for each file:

  • If a path was explicitly associated with the file when it was added.

  • If you called updateFilePathsAndExtensions (Simulink Coder) to resolve file paths and extensions before calling getFullFileList.

example

Examples

collapse all

After building a project and loading the generated buildInfo.mat file, you can list the files stored in the build information object, buildInfo. This example returns information for the current project and its submodels.

From the code generation folder that contains the buildInfo.mat file, run:

bi = load('buildInfo.mat');
findIncludeFiles(bi.buildInfo);
[fPathNames, names] = getFullFileList(bi.buildInfo);

If you use an fcase option, you limit the listing to the files stored in the build information object for the current project. This example returns information for the current project only (not for submodels).

[fPathNames,names] = getFullFileList(bi.buildInfo,'source');

Input Arguments

collapse all

RTW.BuildInfo object that contains information for compiling and linking generated code.

The optional fcase argument specifies whether the function returns the full list for files in the build information or selected cases of files. If you omit the argument or specify a null character vector (''), the function returns the files from the build information.

ValueFunction Action
'source'Returns source files from the build information.
'include'Returns include files from the build information.
'nonbuild'Returns nonbuild files from the build information.

Example: 'source'

Output Arguments

collapse all

Fully qualified file paths from the build information.

File names from the build information.

Version History

Introduced in R2008a