From bb87f2911b63eaf80e49d689bf52ecf2042ae098 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 May 2014 20:31:09 +0300 Subject: Move from resourcemanager functions related to files into other files. --- src/resources/resourcemanager.h | 76 ++--------------------------------------- 1 file changed, 2 insertions(+), 74 deletions(-) (limited to 'src/resources/resourcemanager.h') diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index 0e14e61bb..824fbddd5 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -105,36 +105,6 @@ class ResourceManager final void searchAndRemoveArchives(const std::string &restrict path, const std::string &restrict ext) const; - /** - * Creates a directory in the write path - */ - bool mkdir(const std::string &path) const; - - /** - * Checks whether the given file or directory exists in the search path - * (PhysFS) - */ - bool exists(const std::string &path) const A_WARN_UNUSED; - - /** - * Checks whether the given file or directory exists - */ - static bool existsLocal(const std::string &path) A_WARN_UNUSED; - - /** - * Checks whether the given path is a directory. - */ - bool isDirectory(const std::string &path) const A_WARN_UNUSED; - - /** - * Returns the real path to a file. Note that this method will always - * return a path, it does not check whether the file exists. - * - * @param file The file to get the real path to. - * @return The real path. - */ - static std::string getPath(const std::string &file) A_WARN_UNUSED; - /** * Creates a resource and adds it to the resource map. * @@ -172,18 +142,6 @@ class ResourceManager final */ bool addResource(const std::string &idPath, Resource *const resource); - /** - * Copies a file from one place to another (useful for extracting - * raw files from a zip archive, for example) - * - * @param src Source file name - * @param dst Destination file name - * @return true on success, false on failure. An error message should be - * in the log file. - */ - static bool copyFile(const std::string &restrict src, - const std::string &restrict dst); - /** * Convenience wrapper around ResourceManager::get for loading * images. @@ -246,37 +204,9 @@ class ResourceManager final */ void moveToDeleted(Resource *const res); - /** - * Allocates data into a buffer pointer for raw data loading. The - * returned data is expected to be freed using free(). - * - * @param fileName The name of the file to be loaded. - * @param fileSize The size of the file that was loaded. - * - * @return An allocated byte array containing the data that was loaded, - * or NULL on fail. - */ - static void *loadFile(const std::string &fileName, - int &fileSize) A_WARN_UNUSED; - - /** - * Retrieves the contents of a text file (PhysFS). - */ - static bool loadTextFile(const std::string &fileName, - StringVect &lines); - - /** - * Retrieves the contents of a text file. - */ - static bool loadTextFileLocal(const std::string &fileName, - StringVect &lines); - - static void saveTextFile(std::string path, - const std::string &restrict name, - const std::string &restrict text); - Image *getRescaled(const Image *const image, - const int width, const int height) A_WARN_UNUSED; + const int width, + const int height) A_WARN_UNUSED; /** * Loads the given filename as an SDL surface. The returned surface is @@ -325,8 +255,6 @@ class ResourceManager final void clearCache(); - static void deleteFilesInDirectory(std::string path); - private: /** * Deletes the resource after logging a cleanup message. -- cgit v1.2.3-60-g2f50