diff options
Diffstat (limited to 'backends/fs/posix/posix-fs.h')
-rw-r--r-- | backends/fs/posix/posix-fs.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/backends/fs/posix/posix-fs.h b/backends/fs/posix/posix-fs.h index bd07749010..4ebce7e9d9 100644 --- a/backends/fs/posix/posix-fs.h +++ b/backends/fs/posix/posix-fs.h @@ -73,6 +73,7 @@ public: virtual Common::SeekableReadStream *createReadStream(); virtual Common::WriteStream *createWriteStream(); + virtual bool create(bool isDirectory); private: /** @@ -81,4 +82,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 |