Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting file status from file without using MFC !!!

Status
Not open for further replies.

HadiRezaee

Technical User
Mar 9, 2001
165
IR
Hi all,
I wanna get File Created Data of file ...
I don't want use MFC ...
Please help me ...
 
I did not get what u want? If u do not want to use MFC for file operations then u will have to use the file input output streams <fstream.h> of standard C++.
 
As I understand you wnt all the information from THE MFC struct (from MSDN):

struct CFileStatus
{
CTime m_ctime; // creation date/time of file
CTime m_mtime; // last modification date/time of file
CTime m_atime; // last access date/time of file
LONG m_size; // logical size of file in bytes
BYTE m_attribute; // logical OR of CFile::Attribute enum values
BYTE _m_padding; // pad the structure to a WORD
TCHAR m_szFullName[_MAX_PATH]; // absolute path name

#ifdef _DEBUG
void Dump( CDumpContext& dc ) const;
#endif
};

Well, the creation/modif/access date you can read with GetFileTime/FileTimeToLocalFileTime API calls.
The size you can read with GetFileSize
The attributes with GetFileAttributes.

HTH,
s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top