android save picker, create dir api wip

This commit is contained in:
2019-09-14 11:24:50 +02:00
parent 729c73eef2
commit 6f6be42a01
7 changed files with 64 additions and 12 deletions

View File

@@ -9,6 +9,7 @@
#ifdef __ANDROID__
#include <dirent.h>
AAssetManager* Asset::m_am;
bool android_create_dir(const std::string& path);
#endif
bool Asset::delete_file(const std::string& path)
@@ -134,6 +135,15 @@ bool Asset::is_asset(const std::string & path)
return path.substr(0, 5) == "data/";
}
bool Asset::create_dir(const std::string& path)
{
#if __WIN__
return PathFileExistsA(path.c_str()) ? true : CreateDirectoryA(path.c_str(), NULL);
#elif __ANDROID__
return android_create_dir(path);
#endif
}
bool Asset::open(const char* path)
{
//LOG("Asset::open %s", path);