struct CFileStatus
{
CTime m_ctime;
CTime m_mtime;
CTime m_atime;
LONG m_size;
BYTE m_attribute;
TCHAR m_szFullName[_MAX_PATH];
};m_attribute
The attribute byte of the file. This is the logical OR of the following enumerated values.
enum Attribute { normal,
readOnly,
hidden,
system,
volume,
directory,
archive
};改变m_attribute只能改变文件的只读属性,而当m_attribute为directory时,该怎么办?
{
CTime m_ctime;
CTime m_mtime;
CTime m_atime;
LONG m_size;
BYTE m_attribute;
TCHAR m_szFullName[_MAX_PATH];
};m_attribute
The attribute byte of the file. This is the logical OR of the following enumerated values.
enum Attribute { normal,
readOnly,
hidden,
system,
volume,
directory,
archive
};改变m_attribute只能改变文件的只读属性,而当m_attribute为directory时,该怎么办?
解决方案 »
- *请教* 只知道窗口句柄 如何获取窗口大小改变消息(wm_size)!!!!
- vc win32控制台程序如何操作sqlserver2000
- CHtmlView有个方法GoBack(),为何对有的网页有作用,有的没用?
- 如果在一个界面上创建两个对话框,为什么有一个不能获得焦点?
- 怎样在MDI程序中初始化时就显示出对话框
- 急!关于毕业设计的,这星期要完成.谁能解决我的问题,一定送分(100)!
- 关于"嗅探"的PacketOpenAdapter (在线等待)
- 拜会各位龙头老大,放一百分先!!
- //=====请高手讲解一下 OnDraw 和 OnPaint 的不同。=====//
- 抖动色是什么呀?
- vc中跟vb中mid函数一样的功能的函数是什么呀
- 关于CTabCtrl的问题?
CString szTemp; CFile::GetStatus(szPath, status); if (status.m_attribute & 0x01)
{
// Read-only: if (AfxMessageBox("This file is Read-only\nChange the attribute?", MB_YESNO) == IDYES)
{
status.m_mtime = 0;
status.m_attribute ^= 0x01; CFile::SetStatus(szPath, status);
}