From 25d4e1e3fe393ee845c868a9e5c163de52748379 Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Sat, 30 Jul 2005 11:55:28 +0000 Subject: Fixed check for updates directory. Moved search/write path setup from resourcemanager to main initialization. --- src/resources/resourcemanager.h | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to 'src/resources/resourcemanager.h') diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index ac3320b6..9db8ccce 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -62,10 +62,38 @@ class ResourceManager ~ResourceManager(); /** - * Searches for zip files and adds them to the PhysicsFS search path. + * Sets the write directory + * + * @param path The path of the directory to be added. + * @return true on success, false otherwise. + */ + bool setWriteDir(const std::string &path); + + /** + * Adds a directory or archive to the search path. + */ + void addToSearchPath(const std::string &path, bool append); + + /** + * Searches for zip files and adds them to the search path. + */ + void searchAndAddArchives( + const std::string &path, const std::string &ext, bool append); + + /** + * Creates a directory in the write path + */ + bool mkdir(const std::string &path); + + /** + * Checks whether the given file or directory exists in the search path + */ + bool exists(const std::string &path); + + /** + * Checks whether the given path is a directory. */ - void ResourceManager::searchAndAddArchives( - const std::string &path, const std::string &ext, int append); + bool isDirectory(const std::string &path); /** * Creates a resource and adds it to the resource map. The idPath is -- cgit v1.2.3-70-g09d2