Skip to Main Content Skip to Search
Product Documentation

updateFileSeparator - Change file separator used in model build information

Syntax

updateFileSeparator(buildinfo, separator)

Arguments

buildinfo

Build information returned by RTW.BuildInfo.

separator

A character array that specifies the file separator \ (Windows®) or / (UNIX®) to be applied to all file path specifications.

Description

The updateFileSeparator function changes all 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 makefile based builds, you can override the default by defining a separator with the MAKEFILE_FILESEP macro in the template makefile (see Cross-Compile Code Generated on a Microsoft Windows System. If the GenerateMakefile parameter is set, the Simulink Coder software overrides the default separator and updates the model build information after evaluating the PostCodeGenCommand configuration parameter.

Examples

Update object myModelBuildInfo to apply the Windows file separator.

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

See Also

addIncludeFiles | addIncludePaths | addSourceFiles | addSourcePaths | updateFilePathsAndExtensions

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS