From 8cb74178c2b8e5883a1181af687fa8cfc0c6e5da Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 18 Nov 2018 23:44:40 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95=E4=B8=BA=E5=B0=8F?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Filesystem/je_asset_database.h | 114 ------------------------------ 1 file changed, 114 deletions(-) delete mode 100644 src/libjin/Filesystem/je_asset_database.h (limited to 'src/libjin/Filesystem/je_asset_database.h') diff --git a/src/libjin/Filesystem/je_asset_database.h b/src/libjin/Filesystem/je_asset_database.h deleted file mode 100644 index e8b1bd1..0000000 --- a/src/libjin/Filesystem/je_asset_database.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef __JE_ASSET_DATABASE_H__ -#define __JE_ASSET_DATABASE_H__ - -#include "../core/je_configuration.h" -#if defined(jin_filesystem) - -#include - -#include "smount/smount.h" - -#include "je_buffer.h" - -namespace JinEngine -{ - namespace Filesystem - { - - /// - /// Assets managment. - /// - class AssetDatabase - { - public: - /// - /// Get asset database singleton. - /// - /// @param Singleton of asset database. - /// - static AssetDatabase* get(); - - /// - /// Asset database constructor. - /// - AssetDatabase(); - - /// - /// Set asset root folder. - /// - /// @param root Root folder of assets. - /// - void mount(const char* root); - - /// - /// Check if the path is directory. - /// - /// @param path Path under asset folder. - /// @return True if the given path is directory, otherwise return false. - /// - bool isDir(const char* path); - - /// - /// Check if the path is file. - /// - /// @param path Path under asset folder. - /// @return True if the given path is file, otherwise return false. - /// - bool isFile(const char* path); - - /// - /// Check if the path exists. - /// @param path Given path. - /// @return True if path exists, otherwise return false. - /// - bool exists(const char* path); - - /// - /// Read file into a buffer. - /// - /// @param path Path of file. - /// @param buffer Buffer to fill. - /// @return True if read sucessful, otherwise return false. - /// - void read(const char* path, Buffer& buffer); - - /// - /// Read file and return data content. - /// - /// @param path Path of file. - /// @param length Length of data. - /// @return Data if read sucessful, otherwise return null. - /// - void* read(const char* path, unsigned int* length); - - /// - /// Get files under given directory. - /// - /// @param path Path of directory. - /// @param recursive Recursivily search folder. - /// @return File list under given directory. - /// - std::vector getFiles(const char* directory, bool recursive = false); - - /// - /// Get full path of asset. - /// - /// @param path Path of asset. - /// @return Full path of asset. - /// - const char* getFull(const char* path); - - private: - static AssetDatabase* mAssetDatabase; -#if jin_filesystem == jin_filesystem_smount - smtShared* mSmt; -#endif - - }; - - } // namespace Filesystem -} // namespace JinEngine - -#endif // jin_filesystem - -#endif \ No newline at end of file -- cgit v1.1-26-g67d0