Home > utility > toAbsPath.m

toAbsPath

PURPOSE ^

toAbsPath: Convert a path string to an absolute path

SYNOPSIS ^

function output=toAbsPath(pathStr)

DESCRIPTION ^

 toAbsPath: Convert a path string to an absolute path
    Usage: output=toAbsPath(pathStr)

    For example:
        absPath=toAbsPath('myWork\code')

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function output=toAbsPath(pathStr)
0002 % toAbsPath: Convert a path string to an absolute path
0003 %    Usage: output=toAbsPath(pathStr)
0004 %
0005 %    For example:
0006 %        absPath=toAbsPath('myWork\code')
0007 
0008 %    Roger Jang, 20080606
0009 
0010 output=pathStr;
0011 if ~isAbsPath(pathStr)
0012     output=[pwd, '\', pathStr];
0013 end

Generated on Tue 01-Jun-2010 09:50:34 by m2html © 2003