diff options
author | Johannes Schickel | 2016-01-29 20:09:29 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-02-02 09:16:40 +0100 |
commit | 2622cded72c93f02b9852e77556279a6bc8e5094 (patch) | |
tree | f38a18dcfb7ac181e6c312924a0511dbc14b8714 /backends/fs/posix/posix-fs.h | |
parent | dde89c36f53558c64c5fce2c87850028b89ca45d (diff) | |
download | scummvm-rg350-2622cded72c93f02b9852e77556279a6bc8e5094.tar.gz scummvm-rg350-2622cded72c93f02b9852e77556279a6bc8e5094.tar.bz2 scummvm-rg350-2622cded72c93f02b9852e77556279a6bc8e5094.zip |
POSIX: Move assureDirectoryExists to posix-fs{.h,.cpp}.
Diffstat (limited to 'backends/fs/posix/posix-fs.h')
-rw-r--r-- | backends/fs/posix/posix-fs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/backends/fs/posix/posix-fs.h b/backends/fs/posix/posix-fs.h index bd07749010..0703ac5bf5 100644 --- a/backends/fs/posix/posix-fs.h +++ b/backends/fs/posix/posix-fs.h @@ -81,4 +81,18 @@ private: virtual void setFlags(); }; +namespace Posix { + +/** + * Assure that a directory path exists. + * + * @param dir The path which is required to exist. + * @param prefix An (optional) prefix which should not be created if non existent. + * prefix is prepended to dir if supplied. + * @return true in case the directoy exists (or was created), false otherwise. + */ +bool assureDirectoryExists(const Common::String &dir, const char *prefix = nullptr); + +} // End of namespace Posix + #endif |