filesep - File separator for current platform - MATLAB (original) (raw)
Main Content
File separator for current platform
Syntax
Description
`f` = filesep
returns the platform-specific file separator character. The file separator is the character that separates individual folder and file names in a path.
Examples
Create a path to the iofun
folder on a Microsoft® Windows® platform.
iofun_dir = ['toolbox' filesep 'matlab' filesep 'iofun']
iofun_dir =
'toolbox\matlab\iofun'
Create a path to the iofun
folder on a Linux® platform.
iofun_dir = ['toolbox' filesep 'matlab' filesep 'iofun']
iofun_dir = 'toolbox/matlab/iofun'
Extended Capabilities
Usage notes and limitations:
- Returns the file separator character based on the MATLAB® version you use for code generation.
Version History
Introduced before R2006a