CreateDirectory(L"./123", NULL);//创建文件夹
RemoveDirectory(L"./123");//删除文件夹
PathIsDirectoryEmpty();判断文件夹是否为空
2. C++ 判断文件/文件夹 是否存在
- #include <iostream.h>
- string strFileName = "filePath";
- if (PathIsDirectory(strFileName))
- {
- //判断文件夹是否存在
- }
- if (PathFileExists(strFileName))
- {
- //判断文件是否存在
- }