My goal is simple: I'd like a to clear a directory (delete all of the sub-directories and files it contains, but not delete the directory itself) given a path, in a cross-platform way.
Most of the solutions I've found online either involve using dirent.h
which, from my understanding, is non-standard and may not work on non-POSIX systems (notably Windows) or using Boost.Filesystem. However, building Boost and including it in my project is a lot to ask for if all I'd like to do is clear a directory.
Is there a way to achieve my goal in standard C++? Or, has the standard not advanced to this point yet?