expo-file-system 19.0.22-canary-20251216-6e1f9a7 → 19.0.22-canary-20251223-b83b31e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt +12 -5
- package/android/src/main/java/expo/modules/filesystem/FileSystemPath.kt +44 -34
- package/android/src/main/java/expo/modules/filesystem/legacy/FileSystemLegacyModule.kt +4 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7-sources.jar → 19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e-sources.jar} +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e-sources.jar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e-sources.jar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e-sources.jar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e-sources.jar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.aar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.aar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.aar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.aar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.module → 19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.module} +22 -22
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.pom → 19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha512 +1 -1
- package/package.json +4 -4
- package/android/src/main/java/expo/modules/filesystem/legacy/AppDirectoriesModule.kt +0 -26
- package/android/src/main/java/expo/modules/filesystem/legacy/FilePermissionModule.kt +0 -48
- package/android/src/main/java/expo/modules/filesystem/legacy/FileSystemPackage.kt +0 -10
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7-sources.jar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7-sources.jar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7-sources.jar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7-sources.jar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.aar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.aar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.aar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.aar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-6e1f9a7/expo.modules.filesystem-19.0.22-canary-20251216-6e1f9a7.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
### 💡 Others
|
|
14
14
|
|
|
15
|
-
- [Android] Add `android:maxSdkVersion` annotation to
|
|
15
|
+
- [Android] Add `android:maxSdkVersion` annotation to `READ_EXTERNAL_STORAGE` and `WRITE_EXTERNAL_STORAGE` permissions. ([#40976](https://github.com/expo/expo/pull/40976) by [@behenate](https://github.com/behenate))
|
|
16
|
+
- [Android] Removed references to legacy native modules API. ([#41791](https://github.com/expo/expo/pull/41791) by [@lukmccall](https://github.com/lukmccall))
|
|
16
17
|
|
|
17
18
|
## 19.0.20 - 2025-12-05
|
|
18
19
|
|
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '19.0.22-canary-
|
|
7
|
+
version = '19.0.22-canary-20251223-b83b31e'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.filesystem"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 30
|
|
13
|
-
versionName "19.0.22-canary-
|
|
13
|
+
versionName "19.0.22-canary-20251223-b83b31e"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -21,7 +21,6 @@ import okhttp3.Request
|
|
|
21
21
|
import java.io.File
|
|
22
22
|
import java.io.FileOutputStream
|
|
23
23
|
import java.net.URI
|
|
24
|
-
import java.util.EnumSet
|
|
25
24
|
|
|
26
25
|
class FileSystemModule : Module() {
|
|
27
26
|
private val context: Context
|
|
@@ -100,7 +99,9 @@ class FileSystemModule : Module() {
|
|
|
100
99
|
}
|
|
101
100
|
|
|
102
101
|
AsyncFunction("pickDirectoryAsync") Coroutine { initialUri: Uri? ->
|
|
103
|
-
val result = filePickerLauncher.launch(
|
|
102
|
+
val result = filePickerLauncher.launch(
|
|
103
|
+
FilePickerContractOptions(initialUri, null, PickerType.DIRECTORY)
|
|
104
|
+
)
|
|
104
105
|
when (result) {
|
|
105
106
|
is FilePickerContractResult.Success -> result.path as FileSystemDirectory
|
|
106
107
|
is FilePickerContractResult.Cancelled -> throw PickerCancelledException()
|
|
@@ -108,7 +109,9 @@ class FileSystemModule : Module() {
|
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
AsyncFunction("pickFileAsync") Coroutine { initialUri: Uri?, mimeType: String? ->
|
|
111
|
-
val result = filePickerLauncher.launch(
|
|
112
|
+
val result = filePickerLauncher.launch(
|
|
113
|
+
FilePickerContractOptions(initialUri, mimeType, PickerType.FILE)
|
|
114
|
+
)
|
|
112
115
|
when (result) {
|
|
113
116
|
is FilePickerContractResult.Success -> result.path as FileSystemFile
|
|
114
117
|
is FilePickerContractResult.Cancelled -> throw PickerCancelledException()
|
|
@@ -117,8 +120,12 @@ class FileSystemModule : Module() {
|
|
|
117
120
|
|
|
118
121
|
Function("info") { url: URI ->
|
|
119
122
|
val file = File(url)
|
|
120
|
-
val permissions = appContext
|
|
121
|
-
|
|
123
|
+
val permissions = appContext
|
|
124
|
+
.filePermission
|
|
125
|
+
.getPathPermissions(
|
|
126
|
+
appContext.reactContext ?: throw Exceptions.ReactContextLost(),
|
|
127
|
+
file.path
|
|
128
|
+
)
|
|
122
129
|
if (permissions.contains(Permission.READ) && file.exists()) {
|
|
123
130
|
PathInfo(exists = file.exists(), isDirectory = file.isDirectory)
|
|
124
131
|
} else {
|
|
@@ -8,19 +8,22 @@ import expo.modules.filesystem.unifiedfile.JavaFile
|
|
|
8
8
|
import expo.modules.filesystem.unifiedfile.SAFDocumentFile
|
|
9
9
|
import expo.modules.filesystem.unifiedfile.UnifiedFileInterface
|
|
10
10
|
import expo.modules.interfaces.filesystem.Permission
|
|
11
|
+
import expo.modules.kotlin.exception.Exceptions
|
|
11
12
|
import expo.modules.kotlin.sharedobjects.SharedObject
|
|
12
13
|
import java.io.File
|
|
13
14
|
import java.util.EnumSet
|
|
14
15
|
import java.util.regex.Pattern
|
|
15
16
|
import kotlin.io.path.moveTo
|
|
16
17
|
|
|
17
|
-
val Uri.isContentUri
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
val Uri.isContentUri
|
|
19
|
+
get(): Boolean {
|
|
20
|
+
return scheme == "content"
|
|
21
|
+
}
|
|
20
22
|
|
|
21
|
-
val Uri.isAssetUri
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
val Uri.isAssetUri
|
|
24
|
+
get(): Boolean {
|
|
25
|
+
return scheme == "asset"
|
|
26
|
+
}
|
|
24
27
|
|
|
25
28
|
fun slashifyFilePath(path: String?): String? {
|
|
26
29
|
return if (path == null) {
|
|
@@ -35,27 +38,29 @@ fun slashifyFilePath(path: String?): String? {
|
|
|
35
38
|
|
|
36
39
|
abstract class FileSystemPath(var uri: Uri) : SharedObject() {
|
|
37
40
|
private var fileAdapter: UnifiedFileInterface? = null
|
|
38
|
-
val file: UnifiedFileInterface
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
val javaFile: File get() =
|
|
54
|
-
if (uri.isContentUri) {
|
|
55
|
-
throw Exception("This method cannot be used with content URIs: $uri")
|
|
56
|
-
} else {
|
|
57
|
-
(file as File)
|
|
41
|
+
val file: UnifiedFileInterface
|
|
42
|
+
get() {
|
|
43
|
+
val currentAdapter = fileAdapter
|
|
44
|
+
if (currentAdapter?.uri == uri) {
|
|
45
|
+
return currentAdapter
|
|
46
|
+
}
|
|
47
|
+
val newAdapter = if (uri.isContentUri) {
|
|
48
|
+
SAFDocumentFile(appContext?.reactContext ?: throw Exception("No context"), uri)
|
|
49
|
+
} else if (uri.isAssetUri) {
|
|
50
|
+
AssetFile(appContext?.reactContext ?: throw Exception("No context"), uri)
|
|
51
|
+
} else {
|
|
52
|
+
JavaFile(uri)
|
|
53
|
+
}
|
|
54
|
+
fileAdapter = newAdapter
|
|
55
|
+
return newAdapter
|
|
58
56
|
}
|
|
57
|
+
val javaFile: File
|
|
58
|
+
get() =
|
|
59
|
+
if (uri.isContentUri) {
|
|
60
|
+
throw Exception("This method cannot be used with content URIs: $uri")
|
|
61
|
+
} else {
|
|
62
|
+
(file as File)
|
|
63
|
+
}
|
|
59
64
|
|
|
60
65
|
fun delete() {
|
|
61
66
|
if (!file.exists()) {
|
|
@@ -117,7 +122,10 @@ abstract class FileSystemPath(var uri: Uri) : SharedObject() {
|
|
|
117
122
|
// TODO: Consider adding a check for asset URIs – this returns asset files of Expo Go (such as root-cert), but these are already freely available on apk mirrors ect.
|
|
118
123
|
return true
|
|
119
124
|
}
|
|
120
|
-
|
|
125
|
+
|
|
126
|
+
val permissions = appContext?.filePermission?.getPathPermissions(
|
|
127
|
+
appContext?.reactContext ?: throw Exceptions.ReactContextLost(), javaFile.path
|
|
128
|
+
) ?: EnumSet.noneOf(Permission::class.java)
|
|
121
129
|
return permissions.contains(permission)
|
|
122
130
|
}
|
|
123
131
|
|
|
@@ -167,12 +175,14 @@ abstract class FileSystemPath(var uri: Uri) : SharedObject() {
|
|
|
167
175
|
}
|
|
168
176
|
}
|
|
169
177
|
|
|
170
|
-
val modificationTime: Long?
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
178
|
+
val modificationTime: Long?
|
|
179
|
+
get() {
|
|
180
|
+
validateType()
|
|
181
|
+
return file.lastModified()
|
|
182
|
+
}
|
|
174
183
|
|
|
175
|
-
val creationTime: Long?
|
|
176
|
-
|
|
177
|
-
|
|
184
|
+
val creationTime: Long?
|
|
185
|
+
get() {
|
|
186
|
+
return file.creationTime
|
|
187
|
+
}
|
|
178
188
|
}
|
|
@@ -767,7 +767,10 @@ open class FileSystemLegacyModule : Module() {
|
|
|
767
767
|
}
|
|
768
768
|
|
|
769
769
|
private fun permissionsForPath(path: String?): EnumSet<Permission>? {
|
|
770
|
-
|
|
770
|
+
if (path == null) {
|
|
771
|
+
return null
|
|
772
|
+
}
|
|
773
|
+
return appContext.filePermission.getPathPermissions(context, path)
|
|
771
774
|
}
|
|
772
775
|
|
|
773
776
|
private fun permissionsForUri(uri: Uri) = when {
|
package/expo-module.config.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a14a0a76c4d694693a50552bab98f995
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
222e8686a7f1d4f46473eb56c1946c4d4ef61e0b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dd526144f0b026a080683cb5fc697d5166b2c12c28cd2887b58f061b0c84b4cd
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2c7c8575ab069ae2c7808f2b9e86f9e01a96f2c22aa61db8f5bcf08db0ea4aa6e8c3ae4deda36d40600a7c6a48293b7273dcefe96e657d6d5705a95cf4ce55c2
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d7c7cf4f7417abffe1108fad52cdcf2a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
48e9428c81b57fa9447e125914fa9fc7f15e4804
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
701a6384c0dda302325a24140cee9e8494fc0ea63bcd1a1319c0d4699efd24b3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
978986e5d92d082b361ac01c69b5b5503b5461b085e6126210dd826403530fbb80a55ad52eb7ab3b2b5df18cbd3ccad366e3420c11ef494da4ad0279eb90e3ab
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.filesystem",
|
|
6
|
-
"version": "19.0.22-canary-
|
|
6
|
+
"version": "19.0.22-canary-20251223-b83b31e",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
],
|
|
76
76
|
"files": [
|
|
77
77
|
{
|
|
78
|
-
"name": "expo.modules.filesystem-19.0.22-canary-
|
|
79
|
-
"url": "expo.modules.filesystem-19.0.22-canary-
|
|
80
|
-
"size":
|
|
81
|
-
"sha512": "
|
|
82
|
-
"sha256": "
|
|
83
|
-
"sha1": "
|
|
84
|
-
"md5": "
|
|
78
|
+
"name": "expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.aar",
|
|
79
|
+
"url": "expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.aar",
|
|
80
|
+
"size": 388902,
|
|
81
|
+
"sha512": "978986e5d92d082b361ac01c69b5b5503b5461b085e6126210dd826403530fbb80a55ad52eb7ab3b2b5df18cbd3ccad366e3420c11ef494da4ad0279eb90e3ab",
|
|
82
|
+
"sha256": "701a6384c0dda302325a24140cee9e8494fc0ea63bcd1a1319c0d4699efd24b3",
|
|
83
|
+
"sha1": "48e9428c81b57fa9447e125914fa9fc7f15e4804",
|
|
84
|
+
"md5": "d7c7cf4f7417abffe1108fad52cdcf2a"
|
|
85
85
|
}
|
|
86
86
|
]
|
|
87
87
|
},
|
|
@@ -153,13 +153,13 @@
|
|
|
153
153
|
],
|
|
154
154
|
"files": [
|
|
155
155
|
{
|
|
156
|
-
"name": "expo.modules.filesystem-19.0.22-canary-
|
|
157
|
-
"url": "expo.modules.filesystem-19.0.22-canary-
|
|
158
|
-
"size":
|
|
159
|
-
"sha512": "
|
|
160
|
-
"sha256": "
|
|
161
|
-
"sha1": "
|
|
162
|
-
"md5": "
|
|
156
|
+
"name": "expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.aar",
|
|
157
|
+
"url": "expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.aar",
|
|
158
|
+
"size": 388902,
|
|
159
|
+
"sha512": "978986e5d92d082b361ac01c69b5b5503b5461b085e6126210dd826403530fbb80a55ad52eb7ab3b2b5df18cbd3ccad366e3420c11ef494da4ad0279eb90e3ab",
|
|
160
|
+
"sha256": "701a6384c0dda302325a24140cee9e8494fc0ea63bcd1a1319c0d4699efd24b3",
|
|
161
|
+
"sha1": "48e9428c81b57fa9447e125914fa9fc7f15e4804",
|
|
162
|
+
"md5": "d7c7cf4f7417abffe1108fad52cdcf2a"
|
|
163
163
|
}
|
|
164
164
|
]
|
|
165
165
|
},
|
|
@@ -173,13 +173,13 @@
|
|
|
173
173
|
},
|
|
174
174
|
"files": [
|
|
175
175
|
{
|
|
176
|
-
"name": "expo.modules.filesystem-19.0.22-canary-
|
|
177
|
-
"url": "expo.modules.filesystem-19.0.22-canary-
|
|
178
|
-
"size":
|
|
179
|
-
"sha512": "
|
|
180
|
-
"sha256": "
|
|
181
|
-
"sha1": "
|
|
182
|
-
"md5": "
|
|
176
|
+
"name": "expo.modules.filesystem-19.0.22-canary-20251223-b83b31e-sources.jar",
|
|
177
|
+
"url": "expo.modules.filesystem-19.0.22-canary-20251223-b83b31e-sources.jar",
|
|
178
|
+
"size": 27490,
|
|
179
|
+
"sha512": "2c7c8575ab069ae2c7808f2b9e86f9e01a96f2c22aa61db8f5bcf08db0ea4aa6e8c3ae4deda36d40600a7c6a48293b7273dcefe96e657d6d5705a95cf4ce55c2",
|
|
180
|
+
"sha256": "dd526144f0b026a080683cb5fc697d5166b2c12c28cd2887b58f061b0c84b4cd",
|
|
181
|
+
"sha1": "222e8686a7f1d4f46473eb56c1946c4d4ef61e0b",
|
|
182
|
+
"md5": "a14a0a76c4d694693a50552bab98f995"
|
|
183
183
|
}
|
|
184
184
|
]
|
|
185
185
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a1a6d3eba34895bd5ef519ed6d475e16
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
046640f47099af6226326dc4e653722c6d6a0570
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0558dbe3845d43a70996d4166a67ecb92ce81392e677727c11a46c0a586ab5d0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bae3a562878442b33f282fb14448ca487e7ebe25a777b09d1ef461515a76aba98216bc2e0aeafbe3d7f1f75abf3049f25b70e26d117e830a426d3f81a15f5777
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>host.exp.exponent</groupId>
|
|
11
11
|
<artifactId>expo.modules.filesystem</artifactId>
|
|
12
|
-
<version>19.0.22-canary-
|
|
12
|
+
<version>19.0.22-canary-20251223-b83b31e</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.filesystem</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
aaa22f0cc915e3cfa6c775a77991194c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d25fd387865321f37436f30e150aa7304e9754bb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b2673dc0378611dece62681272cebf2b4037faa11d4095ea5a9c4d0278fea5f6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6653e36638276b5dbba8700bd3a81cab00079993dcf84f7c8f0dd90395bce8bcf329233b7984dc39cd02ef5728c46df03fd8a32a4d3391974926c6f4e16ee970
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.filesystem</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>19.0.22-canary-
|
|
7
|
-
<release>19.0.22-canary-
|
|
6
|
+
<latest>19.0.22-canary-20251223-b83b31e</latest>
|
|
7
|
+
<release>19.0.22-canary-20251223-b83b31e</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>19.0.22-canary-
|
|
9
|
+
<version>19.0.22-canary-20251223-b83b31e</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20251223153428</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d536e6d1f5a01302b7f1a770441ba384
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
8e0fb7a80e8b231dbcf1d99175d8700993a5063b
|
package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c56c98144f5db68af9c7cc5a40cfa20d598bf46ab54d3a0ae0fcfe4c47502986
|
package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha512
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
95f245cd37142db82946e523d70feb0a3721df060c86c3b51712ff4df9ef2ef77081ea0338e8c237341c28d9a66f80a6ec9adf8b1c8c97a62a94852051192fa0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-file-system",
|
|
3
|
-
"version": "19.0.22-canary-
|
|
3
|
+
"version": "19.0.22-canary-20251223-b83b31e",
|
|
4
4
|
"description": "Provides access to the local file system on the device.",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"preset": "expo-module-scripts"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"expo-module-scripts": "5.1.0-canary-
|
|
52
|
-
"jest-expo": "55.0.0-canary-
|
|
51
|
+
"expo-module-scripts": "5.1.0-canary-20251223-b83b31e",
|
|
52
|
+
"jest-expo": "55.0.0-canary-20251223-b83b31e"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"expo": "55.0.0-canary-
|
|
55
|
+
"expo": "55.0.0-canary-20251223-b83b31e",
|
|
56
56
|
"react-native": "*"
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
package expo.modules.filesystem.legacy
|
|
2
|
-
|
|
3
|
-
import android.content.Context
|
|
4
|
-
import expo.modules.core.interfaces.InternalModule
|
|
5
|
-
import expo.modules.interfaces.filesystem.AppDirectoriesModuleInterface
|
|
6
|
-
import java.io.File
|
|
7
|
-
|
|
8
|
-
/*
|
|
9
|
-
New Sweet API modules don't have an easy way to access scoped context. We can't initialize them with scoped context as they need a ReactApplicationContext instead.
|
|
10
|
-
We can't make ScopedContext inherit from ReactApplicationContext as that would require moving ScopedContext to versioned and a large refactor.
|
|
11
|
-
|
|
12
|
-
This module is a stopgap solution to provide modules with a way to access ScopedContext directories using the filesystem module, only for our internal modules.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
// The class needs to be 'open', because it's inherited in expoview
|
|
16
|
-
open class AppDirectoriesModule(private val context: Context) : AppDirectoriesModuleInterface, InternalModule {
|
|
17
|
-
|
|
18
|
-
override fun getExportedInterfaces(): List<Class<*>> =
|
|
19
|
-
listOf(AppDirectoriesModuleInterface::class.java)
|
|
20
|
-
|
|
21
|
-
override val cacheDirectory: File
|
|
22
|
-
get() = context.cacheDir
|
|
23
|
-
|
|
24
|
-
override val persistentFilesDirectory: File
|
|
25
|
-
get() = context.filesDir
|
|
26
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
package expo.modules.filesystem.legacy
|
|
2
|
-
|
|
3
|
-
import android.content.Context
|
|
4
|
-
import expo.modules.interfaces.filesystem.FilePermissionModuleInterface
|
|
5
|
-
import expo.modules.core.interfaces.InternalModule
|
|
6
|
-
import expo.modules.interfaces.filesystem.Permission
|
|
7
|
-
import java.io.File
|
|
8
|
-
import java.io.IOException
|
|
9
|
-
import java.util.*
|
|
10
|
-
|
|
11
|
-
// The class needs to be 'open', because it's inherited in expoview
|
|
12
|
-
open class FilePermissionModule : FilePermissionModuleInterface, InternalModule {
|
|
13
|
-
override fun getExportedInterfaces(): List<Class<*>> =
|
|
14
|
-
listOf(FilePermissionModuleInterface::class.java)
|
|
15
|
-
|
|
16
|
-
override fun getPathPermissions(context: Context, path: String): EnumSet<Permission> =
|
|
17
|
-
getInternalPathPermissions(path, context) ?: getExternalPathPermissions(path)
|
|
18
|
-
|
|
19
|
-
private fun getInternalPathPermissions(path: String, context: Context): EnumSet<Permission>? {
|
|
20
|
-
return try {
|
|
21
|
-
val canonicalPath = File(path).canonicalPath
|
|
22
|
-
getInternalPaths(context)
|
|
23
|
-
.firstOrNull { dir -> canonicalPath.startsWith("$dir/") || dir == canonicalPath }
|
|
24
|
-
?.let { EnumSet.of(Permission.READ, Permission.WRITE) }
|
|
25
|
-
} catch (e: IOException) {
|
|
26
|
-
EnumSet.noneOf(Permission::class.java)
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
protected open fun getExternalPathPermissions(path: String): EnumSet<Permission> {
|
|
31
|
-
val file = File(path)
|
|
32
|
-
return EnumSet.noneOf(Permission::class.java).apply {
|
|
33
|
-
if (file.canRead()) {
|
|
34
|
-
add(Permission.READ)
|
|
35
|
-
}
|
|
36
|
-
if (file.canWrite()) {
|
|
37
|
-
add(Permission.WRITE)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@Throws(IOException::class)
|
|
43
|
-
private fun getInternalPaths(context: Context): List<String> =
|
|
44
|
-
listOf(
|
|
45
|
-
context.filesDir.canonicalPath,
|
|
46
|
-
context.cacheDir.canonicalPath
|
|
47
|
-
)
|
|
48
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
package expo.modules.filesystem.legacy
|
|
2
|
-
|
|
3
|
-
import android.content.Context
|
|
4
|
-
import expo.modules.core.BasePackage
|
|
5
|
-
import expo.modules.core.interfaces.InternalModule
|
|
6
|
-
|
|
7
|
-
class FileSystemPackage : BasePackage() {
|
|
8
|
-
override fun createInternalModules(context: Context): List<InternalModule> =
|
|
9
|
-
listOf(FilePermissionModule(), AppDirectoriesModule(context))
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d3f99d83252bbc8fcf013f07d3d86ea8
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
464959bdf2015e626f82e9af6c6c28a6498240e3
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4177d9bd9a22a528b97cc2f2bd7ba47f6cbf7fb1c09d93a1cacdce6f553b05d6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6cac7b2fa58a18696e1468e4e9afe7e6092ca1a404351400345349e028cbaeda51386f4303d05372a2be2baf8de77fd97490ea91caa74bfc2a8cfe7b62619bfe
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d1496f79ec35ab85452ff33b608b13fd
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bc51c8dda80dd8be7a700052d158bae50d9e6d13
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
64296d18c5609bd13c32abe79e4cdbc2baa25ceae129b62531a15bf5c68f8a64
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a5291613c37278eb20f359b7119621e1046f0c6499b8ba8d98bc7dd3eb3a180312f35de230e1c1c273342e6567dbf98c09f36de8ab54150af58f78e1193d0811
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6cb5ae6c9589d408d464ee362a537a60
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ac0000adc5db4fb5d820238425730dcfc2e4f692
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
03c2e19e847bb386d88d809fc5836b332291b964562b4b77a64cab09f2129f0c
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
42dbbd30392f691563e4321a641515427d78ed727385d937aabc9cdb2d62d860b770e8e4c323c03cd0d1faf815dd7276d1a113375aaa435be91ea5cdb4c7b256
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6a457d43b61845adede47a7f485d76d1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3f89cc08b5d66d7b8423f7355835fa2c69df0f4b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
29e9dd2fc02f389a3ddef47831342e937e4d334df4cdb8f61cfcc069ab13a0c5
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
94205ce3ce8d2067ad9f95ce26d7acfa7869e1bd341d14d9c0f1abbc371c55c8beb2d789c4708ce7cb08d3d054a99c4e50f0389f6a0ca4752d7762930168bede
|