posts - 126,  comments - 73,  trackbacks - 0

//文件夹是否存在
BOOL
MakeSureDirectoryPathExists(
  PCSTRDirPath
);

or

CString     folder=" href_cetemp="">DirPath
);

or

CString     folder="C:\\eaxmple";    
        CFileFind   finder;  
        if   (finder.FindFile(folder)==FALSE)  
        {  
                  CreateDirectory(folder,NULL);  
        }  
        finder.Close();  

or

CFile   file;      
  if   (!file.Open("....",   CFile::modeRead))  
          file.Open("...",   CFile::modeCreate);


 

路径函数里有

//检测路径是否是一个文件夹
BOOL PathIsDirectory(          LPCTSTR pszPath
);

//检测空文件夹
BOOL PathIsDirectoryEmpty(          LPCTSTR pszPath
);


//创建文件夹
BOOL CreateDirectory(
LPCTSTR lpPathName,
LPSECURITY_ATTRIBUTES lpPathName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes);

int
_mkdir(
constchar*dirname
);


//移除文件夹
BOOLRemoveDirectory(
LPCTSTRdirname
);


//移除文件夹
BOOLRemoveDirectory(
LPCTSTRlpPathName);

int_rmdir(
constchar*dirname
);

posted on 2007-01-13 22:58 我风 阅读(298) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2007年1月>
31123456
78910111213
14151617181920
21222324252627
28293031123
45678910

常用链接

留言簿(12)

随笔分类

随笔档案

文章档案

相册

收藏夹

C++

MyFavorite

搜索

  •  

积分与排名

  • 积分 - 319815
  • 排名 - 74

最新评论

阅读排行榜

评论排行榜