From 8b00d67febf133e89f6a0bfabc41feed555dc4a9 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 12 Jan 2019 21:48:33 +0800 Subject: =?UTF-8?q?*=E5=8E=BB=E6=8E=89=E6=96=87=E4=BB=B6=E5=89=8D=E7=BC=80?= =?UTF-8?q?je=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/filesystem/je_asset_database.cpp | 85 ----------------------------- 1 file changed, 85 deletions(-) delete mode 100644 src/libjin/filesystem/je_asset_database.cpp (limited to 'src/libjin/filesystem/je_asset_database.cpp') diff --git a/src/libjin/filesystem/je_asset_database.cpp b/src/libjin/filesystem/je_asset_database.cpp deleted file mode 100644 index 1203643..0000000 --- a/src/libjin/filesystem/je_asset_database.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include "../core/je_configuration.h" -#if defined(jin_filesystem) - -#include -#include -#include /* defines FILENAME_MAX */ - -#include "../common/je_exception.h" - -#include "je_asset_database.h" - -namespace JinEngine -{ - namespace Filesystem - { - - AssetDatabase* AssetDatabase::mAssetDatabase = 0; - - AssetDatabase::AssetDatabase() - { - mSmt = smtnewshared(); - } - - AssetDatabase* AssetDatabase::get() - { - return mAssetDatabase ? mAssetDatabase : (mAssetDatabase = new AssetDatabase()); - } - - void AssetDatabase::mount(const char * path) - { - int err = smtmount(mSmt, path); - if (err) - { - printf("%s mounted path %s", smterrstr(err), path); - exit(1); - } - } - - void AssetDatabase::read(const char* path, Buffer& buffer) - { - size_t size; - byte* data = (byte*)smtread(mSmt, path, &size); - if (data == nullptr) - throw Exception("Could not read file %s.", path); - buffer.bind(data, size); - } - - Buffer* read(const char* path) - { - return nullptr; - } - - void* AssetDatabase::read(const char* path, unsigned int* len) - { - return smtread(mSmt, path, len); - } - - const char* AssetDatabase::getFull(const char* path) - { - return smtfullpath(mSmt, path); - } - - bool AssetDatabase::isDir(const char* path) - { - return smtisdir(mSmt, path); - } - - bool AssetDatabase::isFile(const char* path) - { - return smtisreg(mSmt, path); - } - - bool AssetDatabase::exists(const char* path) - { - return smtexists(mSmt, path) == 0; - } -/* - std::vector AssetDatabase::getFiles(const char* path, bool recursive) - { - } -*/ - } // namespace Filesystem -} // namespace JinEngine - -#endif // jin_filesystem \ No newline at end of file -- cgit v1.1-26-g67d0