TestStdFilesystem.cpp 471 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream>
#if defined(WALBERLA_USE_STD_FILESYSTEM)
#include <filesystem>
#elif defined(WALBERLA_USE_STD_EXPERIMENTAL_FILESYSTEM)
#include <experimental/filesystem>
#endif

int main() {
#if defined(WALBERLA_USE_STD_FILESYSTEM)
   std::filesystem::path p("/tmp/test.txt");
#elif defined(WALBERLA_USE_STD_EXPERIMENTAL_FILESYSTEM)
   std::experimental::filesystem::path p("/tmp/test.txt");
#endif
14
   std::cout << p.extension().string() << std::endl;
15 16
   return 0;
}