Main Content

filesep

File separator for current platform

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.

example

Examples

collapse all

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

Version History

Introduced before R2006a