Main Content

getFullFileList

Get list of files from build information

Description

example

[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.

The function requires the buildinfo, fPathNames, and names arguments. You can use the optional fcase argument. This optional argument lets you include or exclude file cases selectively from file list returned by the function.

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 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 to resolve file paths and extensions before calling getFullFileList.

Examples

collapse all

After building a 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 and its subs.

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 . This example returns information for the current only (not for subs).

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

Input Arguments

collapse all

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

SpecifyFunction 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

Introduced in R2008a