filesep - Directory separator for current platform

Syntax

f = filesep

Description

f = filesep returns the platform-specific file separator character. The file separator is the character that separates individual directory names in a path string.

Examples

Create a path to the iofun directory on a Windows® system:

iofun_dir = ['toolbox' filesep 'matlab' filesep 'iofun']

iofun_dir =
   toolbox\matlab\iofun

Create a path to iofun on a UNIX® system. (UNIX is a registered trademark of The Open Group in the United States and other countries).

iodir = ['toolbox' filesep 'matlab' filesep 'iofun']

iodir =
   toolbox/matlab/iofun

See Also

fullfile, fileparts, pathsep

  


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