Home > utility > isAbsPath.m

isAbsPath

PURPOSE ^

isAbsPath: Return 1 if the given path string is a absolute path

SYNOPSIS ^

function output=isAbsPath(pathStr)

DESCRIPTION ^

 isAbsPath: Return 1 if the given path string is a absolute path
    Usage output=isAbsPath(pathStr)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function output=isAbsPath(pathStr)
0002 % isAbsPath: Return 1 if the given path string is a absolute path
0003 %    Usage output=isAbsPath(pathStr)
0004 
0005 %    Roger Jang, 20080606
0006 
0007 output=any(strcmp(pathStr(1), {'/', '\'}));
0008 
0009 if length(pathStr)>3
0010     if strcmp(pathStr(2:3), ':/')
0011         output=1;
0012     elseif strcmp(pathStr(2:3), ':\')
0013         output=1;
0014     end
0015 end

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