Let's say I have a program that takes paths to the input and output directories from a command line. If the output directory doesn't exist, our program needs to create it. I would like to check (preferably using std::filesystem
) if that path is valid, before sending it to std::filesystem::create_directory()
.
What is the best way to do it?