Home > general > io_fun > path2os.m

path2os

PURPOSE ^

PATH2OS Replaces directory slashes to conform with a OS

SYNOPSIS ^

function string = path2os(string,input)

DESCRIPTION ^

PATH2OS   Replaces directory slashes to conform with a OS

 string = path2os(string)

 Replaces all slashes (/ or \) with the
 slash of the current Operating System.

 Options are:

 string = path2os(string,'\')
 string = path2os(string,'d<os>')    : \
 string = path2os(string,'w<indows>'): \

 string = path2os(string,'/')
 string = path2os(string,'h<ttp>')   : / retains http://
 string = path2os(string,'l<inux>')  : /
 string = path2os(string,'u<nix>')   : /

 Also removes redundant (double) slashes
 that might have arisen when merging
 pathnames like in d:\temp\\foo\\,
 except for double slashes at the beginning of a path ,
 as in //networkdrive/

See also: MKDIR,  EXIST, MKPATH,     COPYFILE, CD, LAST_SUBDIR,
          DELETE, DIR,   FILEATTRIB, MOVEFILE, RMDIR.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Mon 29-Nov-2010 15:42:51 by m2html © 2005