Main Content

updateFileSeparator

Update file separator character for file lists in model build information

Description

example

updateFileSeparator(buildinfo,separator) changes instances of the current file separator (/ or \) in the model build information to the specified file separator.

The default value for the file separator matches the value returned by the MATLAB® command filesep. For template makefile (TMF) approach builds, you can override the default by defining a separator with the MAKEFILE_FILESEP macro in the template makefile. If the GenerateMakefile parameter is set, the code generator overrides the default separator and updates the model build information after evaluating the PostCodeGenCommand configuration parameter.

Examples

collapse all

Update object myModelBuildInfo to apply the Windows® file separator.

myModelBuildInfo = RTW.BuildInfo;
updateFileSeparator(myModelBuildInfo,'\');

Input Arguments

collapse all

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

The separator argument specifies the file separator \ (Windows) or / (UNIX®) to use in file path specifications in the build information.

Example: '\'

Introduced in R2006a