X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ffilesys.h;h=8bf43c3faf3de62a6eeb861216890f904659c373;hb=7d37913ea4f83807c508cec81b39744d69f481f8;hp=e46b17b0def460faace60aa16759a1004890be54;hpb=035345f13d2da9eced87a426a671d3bc4df392b5;p=dragonfireclient.git diff --git a/src/filesys.h b/src/filesys.h index e46b17b0d..8bf43c3fa 100644 --- a/src/filesys.h +++ b/src/filesys.h @@ -24,6 +24,14 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "exceptions.h" +#ifdef _WIN32 // WINDOWS +#define DIR_DELIM "\\" +#define DIR_DELIM_C '\\' +#else // POSIX +#define DIR_DELIM "/" +#define DIR_DELIM_C '/' +#endif + namespace fs { @@ -38,9 +46,13 @@ std::vector GetDirListing(std::string path); // Returns true if already exists bool CreateDir(std::string path); +// Create all directories on the given path that don't already exist. +bool CreateAllDirs(std::string path); + bool PathExists(std::string path); // Only pass full paths to this one. True on success. +// NOTE: The WIN32 version returns always true. bool RecursiveDelete(std::string path); // Only pass full paths to this one. True on success.