代码
#include<experimental/filesystem>
#include<iostream>
int main()
{
std::string dicom_dir = "D\\hablee";
if (std::experimental::filesystem::exists(dicom_dir) == false)
{
std::cout << dicom_dir << " is not exists." << std::endl;
return;
}
else
{
if (std::experimental::filesystem::is_empty(dicom_dir))
{
std::cout << dicom_dir << " is empty." << std::endl;
return;
}
}
//
std::cout<<dicom_dir<<" exists and is not empty."<<std::endl;
return 0;
}