Add full support for Android scoped storage.
This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer. This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
This commit is contained in:
committed by
Fredia Huya-Kouadio
parent
ff78e2d4c5
commit
24e3b3b88d
@ -49,10 +49,6 @@
|
||||
#include <mntent.h>
|
||||
#endif
|
||||
|
||||
DirAccess *DirAccessUnix::create_fs() {
|
||||
return memnew(DirAccessUnix);
|
||||
}
|
||||
|
||||
Error DirAccessUnix::list_dir_begin() {
|
||||
list_dir_end(); //close any previous dir opening!
|
||||
|
||||
|
||||
@ -43,13 +43,11 @@
|
||||
class DirAccessUnix : public DirAccess {
|
||||
DIR *dir_stream;
|
||||
|
||||
static DirAccess *create_fs();
|
||||
|
||||
String current_dir;
|
||||
bool _cisdir;
|
||||
bool _cishidden;
|
||||
|
||||
protected:
|
||||
String current_dir;
|
||||
virtual String fix_unicode_name(const char *p_name) const { return String::utf8(p_name); }
|
||||
virtual bool is_hidden(const String &p_name);
|
||||
|
||||
|
||||
@ -335,10 +335,6 @@ Error FileAccessUnix::_set_unix_permissions(const String &p_file, uint32_t p_per
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
FileAccess *FileAccessUnix::create_libc() {
|
||||
return memnew(FileAccessUnix);
|
||||
}
|
||||
|
||||
CloseNotificationFunc FileAccessUnix::close_notification_func = nullptr;
|
||||
|
||||
FileAccessUnix::FileAccessUnix() :
|
||||
|
||||
@ -49,8 +49,6 @@ class FileAccessUnix : public FileAccess {
|
||||
String path;
|
||||
String path_src;
|
||||
|
||||
static FileAccess *create_libc();
|
||||
|
||||
public:
|
||||
static CloseNotificationFunc close_notification_func;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user