CFile::GetStatus

Call this member function to retrieve the status of an open file.

The first version of GetStatus retrieves the status of the open file associated with this CFile object. It does not insert a value into the m_szFullName structure member.

The static version gets the status of the named file and copies the filename to m_szFullName. This function obtains the file status from the directory entry without actually opening the file. It is useful for testing the existence and access rights of a file.

Syntax

BOOL GetStatus( CFileStatus& rStatus ) const;

static BOOL PASCAL GetStatus( LPCTSTR lpszFileName, CFileStatus& rStatus );

At a Glance

Header File Afx.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

See Also

CFile Overview, CFile Member Functions, File Service Classes, CFile::SetStatus, CTime