示例#1
0
time_t GetFileModified(const FILE *fp)
{
        HANDLE hF = (HANDLE) _get_osfhandle(fp->_file);
        FILETIME ft; FILETIME lt;
        if (GetFileTime(hF,NULL, NULL, &ft)) {
                FileTimeToLocalFileTime(&ft,&lt);
                return ConvWin32Time(lt);
        }
        return 0;
}
示例#2
0
void EvalFCtime(const void *data, qCtx *ctx, qStr *out, qArgAry *args)
{
        VALID_ARGC("fctime", 0, 0);
        DIRSTATE *state = (DIRSTATE *) data;
#ifdef WIN32
        if (state->data.ftCreationTime.dwLowDateTime>0) {
                out->PutN(ConvWin32Time(state->data.ftCreationTime));
        }
#else
        if (GetDirStatus(state)) {
    out->PutN((int)state->data.st_ctime);
  }
#endif
}