2.2.3.15.21 string::IsPath

Description

Test whether a string object is a valid path or not.

Syntax

BOOL IsPath( )

Parameters

Return

returns TRUE if the string object is a valid path and exists.

Examples

EX1

void string_IsPath_ex1()
{
	//GetAppPath(TRUE) to get the Origin's program path, 
    //and FALSE to get the User Files path.
    string strPath =  GetAppPath(1) + "OriginC\\system";	

    //The path exists, should return TRUE.    
    bool bRet = strPath.IsPath();
    if(bRet)
        printf(" \"%s\" path exists.\n" , strPath);
    else
        printf(" \"%s\" path not exist.\n" , strPath);
}

Remark

See Also

is_str_has_path, string::IsFile

Header to Include

origin.h