string::IsFile

Description

This member function tests to see whether the string is a valid full path file name or not.

Syntax

BOOL IsFile( )

Parameters

Return

returns TRUE if the string is a filename that exist, otherwise FALSE

Examples

EX1

void string_IsFile_ex1()
{
        //GetAppPath(TRUE) to get the Origin's program path, 
    //and FALSE to get the User Files path.
    string strFile = GetAppPath(1) + "OriginC\\system\\Array.h";
    
    //The file exists, should return TRUE.
    BOOL bRet = strFile.IsFile();
    if(bRet)
        printf("\"%s\" is a valid file existed.", strFile);
    else
        printf("\"%s\" is not a valid file existed.", strFile);
}

Remark

See Also

string::IsPath

header to Include

origin.h