From 58d09aa3ca4409e2a15473b0ac3c0446f0acb1a2 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 22 Oct 2018 21:30:21 +0800 Subject: *misc --- src/libjin/Filesystem/je_asset_database.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (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 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 + #include "../3rdparty/smount/smount.h" #include "je_buffer.h" @@ -31,6 +33,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. /// @@ -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 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 }; -- cgit v1.1-26-g67d0