Поделиться через


CFileFind::GetLastAccessTime

Call this member function to get the time that the specified file was last accessed.

virtual BOOL GetLastAccessTime(
   CTime& refTime 
) const;
virtual BOOL GetLastAccessTime(
   FILETIME* pTimeStamp
) const;

Параметры

  • refTime
    A reference to a CTime object.

  • pTimeStamp
    A pointer to a FILETIME structure containing the time the file was last accessed.

Возвращаемое значение

Nonzero if successful; 0 if unsuccessful. GetLastAccessTime returns 0 only if FindNextFile has never been called on this CFileFind object.

Заметки

You must call FindNextFile at least once before calling GetLastAccessTime.

ПримечаниеПримечание.

Not all file systems use the same semantics to implement the time stamp returned by this function. This function may return the same value returned by other time stamp functions if the underlying file system or server does not support keeping the time attribute. See the Win32_FIND_DATA structure for information about time formats. On some operation systems, the returned time is in the time zone local to the machine were the file is located. See the Win32 FileTimeToLocalFileTime API for more information.

Пример

See the example for CFileFind::GetLength.

Требования

Header: afx.h

См. также

Основные понятия

CFileFind Class

CFileFind Members

Hierarchy Chart