22 #ifndef ANDROID_SAF_FILESYSTEM_H 23 #define ANDROID_SAF_FILESYSTEM_H 27 #include "backends/fs/abstract-fs.h" 29 #include "backends/fs/android/android-fs.h" 39 static jmethodID _MID_getTreeId;
40 static jmethodID _MID_pathToNode;
41 static jmethodID _MID_getChildren;
42 static jmethodID _MID_getChild;
43 static jmethodID _MID_createDirectory;
44 static jmethodID _MID_createFile;
45 static jmethodID _MID_createReadStream;
46 static jmethodID _MID_createWriteStream;
47 static jmethodID _MID_removeNode;
48 static jmethodID _MID_removeTree;
50 static jfieldID _FID__treeName;
51 static jfieldID _FID__root;
54 static jfieldID _FID__parent;
55 static jfieldID _FID__path;
56 static jfieldID _FID__documentId;
57 static jfieldID _FID__flags;
62 static const int DIRECTORY = 1;
63 static const int WRITABLE = 2;
64 static const int READABLE = 4;
88 static const char SAF_MOUNT_POINT[];
122 bool exists()
const override {
return _safNode !=
nullptr; }
127 bool isReadable()
const override {
return _flags & READABLE; }
128 bool isWritable()
const override {
return _flags & WRITABLE; }
138 bool remove()
override;
166 static const char SAF_ADD_FAKE_PATH[];
168 AddSAFFakeNode(
bool fromPath) : _proxied(
nullptr), _fromPath(fromPath) { }
171 bool exists()
const override;
188 bool remove()
override {
return false; }
191 void makeProxySAF()
const;
Common::SeekableReadStream * createReadStream() override
bool isWritable() const override
Definition: android-saf-fs.h:128
bool isReadable() const override
Definition: android-saf-fs.h:127
static AndroidSAFFilesystemNode * makeFromPath(const Common::String &path)
Definition: android-saf-fs.h:36
bool isDirectory() const override
Definition: android-saf-fs.h:180
Common::SeekableWriteStream * createWriteStream(bool atomic) override
Definition: android-fs.h:29
bool createDirectory() override
AbstractFSNode * getChild(const Common::String &n) const override
Definition: android-saf-fs.h:160
~AndroidSAFFilesystemNode() override
ListMode
Definition: fs.h:86
Common::String getName() const override
AndroidSAFFilesystemNode(jobject safTree, jobject safNode)
Common::String getPath() const override
Common::SeekableWriteStream * createWriteStream(bool atomic) override
Definition: android-saf-fs.h:185
AbstractFSNode * getParent() const override
bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override
Common::SeekableReadStream * createReadStream() override
Definition: android-saf-fs.h:184
bool createDirectory() override
Definition: android-saf-fs.h:187
Definition: abstract-fs.h:41
static AndroidSAFFilesystemNode * makeFromTree(jobject safTree)
Common::U32String getDisplayName() const override
Definition: android-saf-fs.h:123
bool isDirectory() const override
Definition: android-saf-fs.h:126