Test the string to see if it begins with a file path, this function does not care whether the file exists or not.
BOOL is_str_has_path( LPCSTR lpFileName )
true if lpFilename begins with a file path ; otherwise false
EX1
void is_str_has_path_ex1() { string strPath = GetAppPath(1) + "\\OriginC\\system\\junk.txt"; //The file junk.txt does not exist,but still returns true // for is_str_has_path() does not care the file 's existence bool bRet = is_str_has_path(strPath); if(bRet) printf(" \"%s\" has a file path\n" , strPath); else printf(" \"%s\" does not have a file path\n" , strPath); }
Is_str_valid_file_path, IsPath, GetFilePath
origin.h