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.

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

expand all

Usage notes and limitations:

Version History

Introduced before R2006a