文件夹创建删除和判断


CreateDirectory(L"./123", NULL);//创建文件夹
RemoveDirectory(L"./123");//删除文件夹

PathIsDirectoryEmpty();判断文件夹是否为空

2. C++ 判断文件/文件夹 是否存在

  1. #include <iostream.h>  
  2. string strFileName = "filePath";  
  3.   
  4. if (PathIsDirectory(strFileName))  
  5. {  
  6.     //判断文件夹是否存在  
  7. }  
  8.   
  9. if (PathFileExists(strFileName))  
  10. {  
  11.     //判断文件是否存在  
  12. }  
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章