Get list of files from build information
The function requires the
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.
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
updateFilePathsAndExtensionsto resolve file paths and extensions before calling
Get Full List of Files
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);
Get List of Source Files
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');
buildinfo — Name of the build information object returned by
fcase — File case to return from the build information
'' (default) |
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
|Returns source files from the build information.|
|Returns include files from the build information.|
|Returns nonbuild files from the build information.|