调用CFileStatus::m_attribute成员变量指出了一个文件的属性(使用逻辑或运算得到的一个复合值),其枚举定义为:enum Attribute {
normal = 0x00,
readOnly = 0x01,
hidden = 0x02,
system = 0x04,
volume = 0x08,
directory = 0x10,
archive = 0x20
};其中:volume,archive是什么意思?有文件的属性为“目录”(directory)的情况吗?
normal = 0x00,
readOnly = 0x01,
hidden = 0x02,
system = 0x04,
volume = 0x08,
directory = 0x10,
archive = 0x20
};其中:volume,archive是什么意思?有文件的属性为“目录”(directory)的情况吗?
extern CFile cfile;
if( cfile.GetStatus( status ) ) // virtual member function
{
#ifdef _DEBUG
afxDump << "File size = " << status.m_size << "\n";
#endif
}
char* pFileName = "test.dat";
if( CFile::GetStatus( pFileName, status ) ) // static function
{
#ifdef _DEBUG
afxDump << "Full file name = " << status.m_szFullName << "\n";
#endif
}
archive,是文件归档