Read/write ops for this implementation are done through the java layer via jni, and so for good performance, it's key to avoid numerous repeated small read/write ops due the jni overhead.
The alternative is to allocate a (conversatively-sized) large buffer to reduce the number of read/write ops over the jni boundary.
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.
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>