◄CFile► ◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── static void SetStatus( const char* pszFileName, const CFileStatus& status ) throw( CFileException ); Parameter Description <pszFileName> A string that is the path to the desired file. The path may be relative or absolute, but may not contain a network name. <status> The buffer containing the new status information. Call GetStatus to prefill the CFileStatus structure with current values, then make changes as required. If a value is 0, then the corresponding status item is not updated. See ◄GetStatus► for a description of the CFileStatus structure. Remarks Sets the status of the file associated with this file location. Under MS-DOS, all times in the CFileStatus structure contain the same value. To set the time, modify the m_mtime field of <status>. The SetStatus function will throw an exception under MS-DOS if the file's read-only attribute is set. Example char* pFileName = "test.dat"; extern BYTE newAttribute; CFileStatus status; CFile::GetStatus( pFileName, status ); status.m_attribute = newAttribute; CFile::SetStatus( pFileName, status ); See Also ◄CFile::GetStatus► -♦-