diff options
author | chai <chaifix@163.com> | 2018-10-22 21:30:21 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-22 21:30:21 +0800 |
commit | 58d09aa3ca4409e2a15473b0ac3c0446f0acb1a2 (patch) | |
tree | 37dadab5575116c75b54064556b045ba8a245871 /src/libjin/Filesystem/je_asset_database.h | |
parent | 99bea1e47c813016d89c9e99296fa66e183d808f (diff) |
*misc
Diffstat (limited to 'src/libjin/Filesystem/je_asset_database.h')
-rw-r--r-- | src/libjin/Filesystem/je_asset_database.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/libjin/Filesystem/je_asset_database.h b/src/libjin/Filesystem/je_asset_database.h index 3d47f15..8c30fc1 100644 --- a/src/libjin/Filesystem/je_asset_database.h +++ b/src/libjin/Filesystem/je_asset_database.h @@ -4,6 +4,8 @@ #include "../core/je_configuration.h" #if defined(jin_filesystem) +#include <vector> + #include "../3rdparty/smount/smount.h" #include "je_buffer.h" @@ -32,6 +34,13 @@ namespace JinEngine 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. @@ -73,11 +82,13 @@ namespace JinEngine void* read(const char* path, unsigned int* length); /// - /// Set asset root folder. - /// - /// @param root Root folder of assets. + /// Get files under given directory. + /// + /// @param path Path of directory. + /// @param recursive Recursivily search folder. + /// @return File list under given directory. /// - void mount(const char* root); + std::vector<std::string> getFiles(const char* path, bool recursive); /// /// Get full path of asset. @@ -89,7 +100,9 @@ namespace JinEngine private: static AssetDatabase* mAssetDatabase; +#if jin_filesystem == jin_filesystem_smount smtShared* mSmt; +#endif }; |