get_file_last_write_time_as_julian

 

Description

Get file last write time as Julian date value

Syntax

BOOL get_file_last_write_time_as_julian( LPCSTR lpcszFile, double * lpdLastWriteTime )

Parameters

lpcszFile
[input] file's full path.
lpdLastWriteTime
[output] pointer to file last write time as Julian date value. default is NULL.

Return

TRUE if Success, otherwise FALSE.

Examples

EX1

//the file test.txt must exist in temp folder path
void get_file_last_write_time_as_julian_Ex1()
{
    char szTemp[MAXFULLPATH];
    GetTempPath(MAXFULLPATH, szTemp); // Get temp folder path.
    string strFile = szTemp + "\\test.txt";
    double dLastWriteTime;
    bool bFlag = get_file_last_write_time_as_julian(strFile, &dLastWriteTime);
    if(!bFlag)
        printf("failed to get file's last write time");
    else out_str("the file's last write time is "+get_date_str(dLastWriteTime, LDF_SHORT_AND_HHMM_SEPARCOLON));
}

Remark

See Also

GetTempPath, get_date_str

header to Include

origin.h

Reference