summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-28 20:31:09 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-28 20:31:09 +0300
commitbb87f2911b63eaf80e49d689bf52ecf2042ae098 (patch)
tree0778087134ec3c5a2370d417bcadb64a1dc6a9bc /src/resources/resourcemanager.h
parent4415cb66734e67dfcdf8924d354107d27fb70fee (diff)
downloadmv-bb87f2911b63eaf80e49d689bf52ecf2042ae098.tar.gz
mv-bb87f2911b63eaf80e49d689bf52ecf2042ae098.tar.bz2
mv-bb87f2911b63eaf80e49d689bf52ecf2042ae098.tar.xz
mv-bb87f2911b63eaf80e49d689bf52ecf2042ae098.zip
Move from resourcemanager functions related to files into other files.
Diffstat (limited to 'src/resources/resourcemanager.h')
-rw-r--r--src/resources/resourcemanager.h76
1 files changed, 2 insertions, 74 deletions
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
@@ -106,36 +106,6 @@ class ResourceManager final
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.
*
* @param idPath The resource identifier path.
@@ -173,18 +143,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 <code>free()</code>.
- *
- * @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 <code>NULL</code> 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.