expo-file-system 19.0.22-canary-20251216-3f01dbf → 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.
Files changed (52) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt +12 -5
  4. package/android/src/main/java/expo/modules/filesystem/FileSystemPath.kt +44 -34
  5. package/android/src/main/java/expo/modules/filesystem/legacy/FileSystemLegacyModule.kt +4 -1
  6. package/expo-module.config.json +1 -1
  7. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf-sources.jar → 19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e-sources.jar} +0 -0
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.module → 19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.module} +22 -22
  18. 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
  19. 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
  20. 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
  21. 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
  22. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.pom → 19.0.22-canary-20251223-b83b31e/expo.modules.filesystem-19.0.22-canary-20251223-b83b31e.pom} +1 -1
  23. 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
  24. 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
  25. 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
  26. 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
  27. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml +4 -4
  28. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.md5 +1 -1
  29. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha1 +1 -1
  30. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha256 +1 -1
  31. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha512 +1 -1
  32. package/package.json +4 -4
  33. package/android/src/main/java/expo/modules/filesystem/legacy/AppDirectoriesModule.kt +0 -26
  34. package/android/src/main/java/expo/modules/filesystem/legacy/FilePermissionModule.kt +0 -48
  35. package/android/src/main/java/expo/modules/filesystem/legacy/FileSystemPackage.kt +0 -10
  36. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf-sources.jar.md5 +0 -1
  37. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf-sources.jar.sha1 +0 -1
  38. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf-sources.jar.sha256 +0 -1
  39. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf-sources.jar.sha512 +0 -1
  40. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.aar +0 -0
  41. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.aar.md5 +0 -1
  42. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.aar.sha1 +0 -1
  43. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.aar.sha256 +0 -1
  44. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.aar.sha512 +0 -1
  45. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.module.md5 +0 -1
  46. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.module.sha1 +0 -1
  47. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.module.sha256 +0 -1
  48. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.module.sha512 +0 -1
  49. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.pom.md5 +0 -1
  50. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.pom.sha1 +0 -1
  51. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.pom.sha256 +0 -1
  52. package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.22-canary-20251216-3f01dbf/expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.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 `READ_EXTERNAL_STORAGE` and `WRITE_EXTERNAL_STORAGE` permissions. ([#40976](https://github.com/expo/expo/pull/40976) by [@behenate](https://github.com/behenate))
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
 
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '19.0.22-canary-20251216-3f01dbf'
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-20251216-3f01dbf"
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(FilePickerContractOptions(initialUri, null, PickerType.DIRECTORY))
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(FilePickerContractOptions(initialUri, mimeType, PickerType.FILE))
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.filePermission?.getPathPermissions(appContext.reactContext, file.path)
121
- ?: EnumSet.noneOf(Permission::class.java)
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 get(): Boolean {
18
- return scheme == "content"
19
- }
18
+ val Uri.isContentUri
19
+ get(): Boolean {
20
+ return scheme == "content"
21
+ }
20
22
 
21
- val Uri.isAssetUri get(): Boolean {
22
- return scheme == "asset"
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 get() {
39
- val currentAdapter = fileAdapter
40
- if (currentAdapter?.uri == uri) {
41
- return currentAdapter
42
- }
43
- val newAdapter = if (uri.isContentUri) {
44
- SAFDocumentFile(appContext?.reactContext ?: throw Exception("No context"), uri)
45
- } else if (uri.isAssetUri) {
46
- AssetFile(appContext?.reactContext ?: throw Exception("No context"), uri)
47
- } else {
48
- JavaFile(uri)
49
- }
50
- fileAdapter = newAdapter
51
- return newAdapter
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
- val permissions = appContext?.filePermission?.getPathPermissions(appContext?.reactContext, javaFile.path) ?: EnumSet.noneOf(Permission::class.java)
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? get() {
171
- validateType()
172
- return file.lastModified()
173
- }
178
+ val modificationTime: Long?
179
+ get() {
180
+ validateType()
181
+ return file.lastModified()
182
+ }
174
183
 
175
- val creationTime: Long? get() {
176
- return file.creationTime
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
- return appContext.filePermission?.getPathPermissions(context, path)
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 {
@@ -12,7 +12,7 @@
12
12
  "publication": {
13
13
  "groupId": "host.exp.exponent",
14
14
  "artifactId": "expo.modules.filesystem",
15
- "version": "19.0.22-canary-20251216-3f01dbf",
15
+ "version": "19.0.22-canary-20251223-b83b31e",
16
16
  "repository": "local-maven-repo"
17
17
  }
18
18
  }
@@ -0,0 +1 @@
1
+ 2c7c8575ab069ae2c7808f2b9e86f9e01a96f2c22aa61db8f5bcf08db0ea4aa6e8c3ae4deda36d40600a7c6a48293b7273dcefe96e657d6d5705a95cf4ce55c2
@@ -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-20251216-3f01dbf",
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-20251216-3f01dbf.aar",
79
- "url": "expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.aar",
80
- "size": 393132,
81
- "sha512": "a5291613c37278eb20f359b7119621e1046f0c6499b8ba8d98bc7dd3eb3a180312f35de230e1c1c273342e6567dbf98c09f36de8ab54150af58f78e1193d0811",
82
- "sha256": "64296d18c5609bd13c32abe79e4cdbc2baa25ceae129b62531a15bf5c68f8a64",
83
- "sha1": "bc51c8dda80dd8be7a700052d158bae50d9e6d13",
84
- "md5": "d1496f79ec35ab85452ff33b608b13fd"
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-20251216-3f01dbf.aar",
157
- "url": "expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf.aar",
158
- "size": 393132,
159
- "sha512": "a5291613c37278eb20f359b7119621e1046f0c6499b8ba8d98bc7dd3eb3a180312f35de230e1c1c273342e6567dbf98c09f36de8ab54150af58f78e1193d0811",
160
- "sha256": "64296d18c5609bd13c32abe79e4cdbc2baa25ceae129b62531a15bf5c68f8a64",
161
- "sha1": "bc51c8dda80dd8be7a700052d158bae50d9e6d13",
162
- "md5": "d1496f79ec35ab85452ff33b608b13fd"
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-20251216-3f01dbf-sources.jar",
177
- "url": "expo.modules.filesystem-19.0.22-canary-20251216-3f01dbf-sources.jar",
178
- "size": 29329,
179
- "sha512": "6cac7b2fa58a18696e1468e4e9afe7e6092ca1a404351400345349e028cbaeda51386f4303d05372a2be2baf8de77fd97490ea91caa74bfc2a8cfe7b62619bfe",
180
- "sha256": "4177d9bd9a22a528b97cc2f2bd7ba47f6cbf7fb1c09d93a1cacdce6f553b05d6",
181
- "sha1": "464959bdf2015e626f82e9af6c6c28a6498240e3",
182
- "md5": "d3f99d83252bbc8fcf013f07d3d86ea8"
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
+ 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-20251216-3f01dbf</version>
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
+ 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-20251216-3f01dbf</latest>
7
- <release>19.0.22-canary-20251216-3f01dbf</release>
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-20251216-3f01dbf</version>
9
+ <version>19.0.22-canary-20251223-b83b31e</version>
10
10
  </versions>
11
- <lastUpdated>20251216100743</lastUpdated>
11
+ <lastUpdated>20251223153428</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 387f825b3c61e5e746d21540166de09c
1
+ d536e6d1f5a01302b7f1a770441ba384
@@ -1 +1 @@
1
- 3a1373f065a71106dcaded84cfa04f02b2e830a5
1
+ 8e0fb7a80e8b231dbcf1d99175d8700993a5063b
@@ -1 +1 @@
1
- d26d468571377396763675298a9c935ae8e517516547e5f952ed6321369cdf7e
1
+ c56c98144f5db68af9c7cc5a40cfa20d598bf46ab54d3a0ae0fcfe4c47502986
@@ -1 +1 @@
1
- a3bf7fb4a2ef2d3f45a33ecf3769d9d47a43af293b4518f321d2df856cab0897545f478331d6925033d0512198332888e831eb3cb847f4ce93b2d012d876529f
1
+ 95f245cd37142db82946e523d70feb0a3721df060c86c3b51712ff4df9ef2ef77081ea0338e8c237341c28d9a66f80a6ec9adf8b1c8c97a62a94852051192fa0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-file-system",
3
- "version": "19.0.22-canary-20251216-3f01dbf",
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-20251216-3f01dbf",
52
- "jest-expo": "55.0.0-canary-20251216-3f01dbf"
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-20251216-3f01dbf",
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
- 6cac7b2fa58a18696e1468e4e9afe7e6092ca1a404351400345349e028cbaeda51386f4303d05372a2be2baf8de77fd97490ea91caa74bfc2a8cfe7b62619bfe
@@ -1 +0,0 @@
1
- a5291613c37278eb20f359b7119621e1046f0c6499b8ba8d98bc7dd3eb3a180312f35de230e1c1c273342e6567dbf98c09f36de8ab54150af58f78e1193d0811
@@ -1 +0,0 @@
1
- a8b6db3b236713a6d258c38c339cc751dd4d587c6cecb70b8dcbd962f22c431b2d136a7c6af16516bd21d96c54d0565c3a5c029d82e1a019ef9bb75e7bcdc919
@@ -1 +0,0 @@
1
- 14627e2b2e987797513003cee74e06cb22a5897ffda3d060d9c26d6e88554ab1f4de2e98d137c0dc36c5810773df249f103c6a762f0be0498b06d0546a6686f6