expo-file-system 13.2.1 → 14.0.0
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 +37 -1
- package/README.md +4 -4
- package/android/build.gradle +42 -48
- package/android/src/main/java/expo/modules/filesystem/CountingRequestBody.kt +2 -2
- package/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt +57 -48
- package/build/ExponentFileSystem.d.ts +1 -0
- package/build/ExponentFileSystem.d.ts.map +1 -0
- package/build/ExponentFileSystem.web.d.ts +1 -0
- package/build/ExponentFileSystem.web.d.ts.map +1 -0
- package/build/ExponentFileSystemShim.d.ts +1 -0
- package/build/ExponentFileSystemShim.d.ts.map +1 -0
- package/build/FileSystem.d.ts +1 -0
- package/build/FileSystem.d.ts.map +1 -0
- package/build/FileSystem.types.d.ts +1 -0
- package/build/FileSystem.types.d.ts.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -0
- package/ios/EXFileSystem.xcframework/ios-arm64/EXFileSystem.framework/EXFileSystem +0 -0
- package/ios/EXFileSystem.xcframework/ios-arm64/EXFileSystem.framework/Info.plist +0 -0
- package/ios/EXFileSystem.xcframework/ios-arm64_x86_64-simulator/EXFileSystem.framework/EXFileSystem +0 -0
- package/ios/EXFileSystem.xcframework/ios-arm64_x86_64-simulator/EXFileSystem.framework/Info.plist +0 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,22 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 14.0.0 — 2022-04-18
|
|
14
|
+
|
|
15
|
+
### 🛠 Breaking changes
|
|
16
|
+
|
|
17
|
+
- Remove okhttp and okio backward compatible workaround and drop react-native 0.64 support. ([#16446](https://github.com/expo/expo/pull/16446) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- Fixed failing download on Android when using `createDownloadResumable()`, because of an invalid Range header. ([#15934](https://github.com/expo/expo/pull/15934) by [@johanpoirier](https://github.com/johanpoirier))
|
|
22
|
+
- Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
|
|
23
|
+
- Fix URL scheme differences between iOS and Android. ([#16352](https://github.com/expo/expo/pull/16352) by [@hbiede](https://github.com/hbiede))
|
|
24
|
+
|
|
25
|
+
### ⚠️ Notices
|
|
26
|
+
|
|
27
|
+
- On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
|
|
28
|
+
|
|
13
29
|
## 13.2.1 — 2022-01-20
|
|
14
30
|
|
|
15
31
|
### 🐛 Bug fixes
|
|
@@ -28,10 +44,30 @@
|
|
|
28
44
|
|
|
29
45
|
- Updated `@expo/config-plugins` from `4.0.2` to `4.0.14` ([#15621](https://github.com/expo/expo/pull/15621) by [@EvanBacon](https://github.com/EvanBacon))
|
|
30
46
|
|
|
31
|
-
## 13.1.
|
|
47
|
+
## 13.1.4 — 2022-02-10
|
|
32
48
|
|
|
33
49
|
_This version does not introduce any user-facing changes._
|
|
34
50
|
|
|
51
|
+
## 13.1.3 — 2022-02-01
|
|
52
|
+
|
|
53
|
+
### 🐛 Bug fixes
|
|
54
|
+
|
|
55
|
+
- Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
|
|
56
|
+
|
|
57
|
+
## 13.1.2 — 2022-01-22
|
|
58
|
+
|
|
59
|
+
### 🐛 Bug fixes
|
|
60
|
+
|
|
61
|
+
- Fixed runtime crash due to `.toUpperCase` not being invoked as a function, it was missing `()`. ([#15615](https://github.com/expo/expo/pull/15615) by [@lukebrandonfarrell](https://github.com/lukebrandonfarrell))
|
|
62
|
+
- Fixed `totalByteSent` in upload progress callback incorrectly sending `bytesSent` on iOS. ([#15615](https://github.com/expo/expo/pull/15615) by [@lukebrandonfarrell](https://github.com/lukebrandonfarrell))
|
|
63
|
+
- Fixed simulator runtime crash on arm64 devices caused by `CFRelease(NULL)`. ([#15496](https://github.com/expo/expo/pull/15496) by [@daxaxelrod](https://github.com/daxaxelrod))
|
|
64
|
+
|
|
65
|
+
## 13.1.1 — 2022-01-20
|
|
66
|
+
|
|
67
|
+
### 🐛 Bug fixes
|
|
68
|
+
|
|
69
|
+
- Fix build errors on React Native 0.66 caused by `okio` and `okhttp`. ([#15632](https://github.com/expo/expo/pull/15632) by [@kudo](https://github.com/kudo))
|
|
70
|
+
|
|
35
71
|
## 13.1.0 — 2021-11-17
|
|
36
72
|
|
|
37
73
|
### 🐛 Bug fixes
|
package/README.md
CHANGED
|
@@ -4,16 +4,16 @@ Provides access to the local file system on the device.
|
|
|
4
4
|
|
|
5
5
|
# API documentation
|
|
6
6
|
|
|
7
|
-
- [Documentation for the
|
|
8
|
-
- [Documentation for the latest stable release](https://docs.expo.
|
|
7
|
+
- [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/filesystem.md)
|
|
8
|
+
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/filesystem/)
|
|
9
9
|
|
|
10
10
|
# Installation in managed Expo projects
|
|
11
11
|
|
|
12
|
-
For
|
|
12
|
+
For [managed](https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/filesystem/).
|
|
13
13
|
|
|
14
14
|
# Installation in bare React Native projects
|
|
15
15
|
|
|
16
|
-
For bare React Native projects,
|
|
16
|
+
For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
|
|
17
17
|
|
|
18
18
|
## Installation in bare iOS React Native project
|
|
19
19
|
|
package/android/build.gradle
CHANGED
|
@@ -1,67 +1,80 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
apply plugin: 'kotlin-android'
|
|
3
|
-
apply plugin: 'maven'
|
|
3
|
+
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '
|
|
6
|
+
version = '14.0.0'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
10
|
+
if (expoModulesCorePlugin.exists()) {
|
|
11
|
+
apply from: expoModulesCorePlugin
|
|
12
|
+
applyKotlinExpoModulesCorePlugin()
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
10
16
|
ext.safeExtGet = { prop, fallback ->
|
|
11
17
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
12
18
|
}
|
|
13
19
|
|
|
20
|
+
// Ensures backward compatibility
|
|
21
|
+
ext.getKotlinVersion = {
|
|
22
|
+
if (ext.has("kotlinVersion")) {
|
|
23
|
+
ext.kotlinVersion()
|
|
24
|
+
} else {
|
|
25
|
+
ext.safeExtGet("kotlinVersion", "1.6.10")
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
14
29
|
repositories {
|
|
15
30
|
mavenCentral()
|
|
16
31
|
}
|
|
17
32
|
|
|
18
33
|
dependencies {
|
|
19
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${
|
|
34
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
37
|
|
|
23
|
-
//
|
|
24
|
-
configurations {
|
|
25
|
-
deployerJars
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//Creating sources with comments
|
|
38
|
+
// Creating sources with comments
|
|
29
39
|
task androidSourcesJar(type: Jar) {
|
|
30
40
|
classifier = 'sources'
|
|
31
41
|
from android.sourceSets.main.java.srcDirs
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
afterEvaluate {
|
|
45
|
+
publishing {
|
|
46
|
+
publications {
|
|
47
|
+
release(MavenPublication) {
|
|
48
|
+
from components.release
|
|
49
|
+
// Add additional sourcesJar to artifacts
|
|
50
|
+
artifact(androidSourcesJar)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
repositories {
|
|
54
|
+
maven {
|
|
55
|
+
url = mavenLocal().url
|
|
56
|
+
}
|
|
44
57
|
}
|
|
45
58
|
}
|
|
46
59
|
}
|
|
47
60
|
|
|
48
61
|
android {
|
|
49
|
-
compileSdkVersion safeExtGet("compileSdkVersion",
|
|
62
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 31)
|
|
50
63
|
|
|
51
64
|
compileOptions {
|
|
52
|
-
sourceCompatibility JavaVersion.
|
|
53
|
-
targetCompatibility JavaVersion.
|
|
65
|
+
sourceCompatibility JavaVersion.VERSION_11
|
|
66
|
+
targetCompatibility JavaVersion.VERSION_11
|
|
54
67
|
}
|
|
55
68
|
|
|
56
69
|
kotlinOptions {
|
|
57
|
-
jvmTarget = JavaVersion.
|
|
70
|
+
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
58
71
|
}
|
|
59
72
|
|
|
60
73
|
defaultConfig {
|
|
61
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
62
|
-
targetSdkVersion safeExtGet("targetSdkVersion",
|
|
75
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
63
76
|
versionCode 30
|
|
64
|
-
versionName "
|
|
77
|
+
versionName "14.0.0"
|
|
65
78
|
}
|
|
66
79
|
lintOptions {
|
|
67
80
|
abortOnError false
|
|
@@ -77,29 +90,10 @@ dependencies {
|
|
|
77
90
|
|
|
78
91
|
api 'commons-codec:commons-codec:1.10'
|
|
79
92
|
api 'commons-io:commons-io:1.4'
|
|
80
|
-
api 'com.squareup.okhttp3:okhttp:
|
|
81
|
-
api 'com.squareup.okhttp3:okhttp-urlconnection:
|
|
82
|
-
api 'com.squareup.okio:okio:
|
|
93
|
+
api 'com.squareup.okhttp3:okhttp:4.9.2'
|
|
94
|
+
api 'com.squareup.okhttp3:okhttp-urlconnection:4.9.2'
|
|
95
|
+
api 'com.squareup.okio:okio:2.9.0'
|
|
83
96
|
api "androidx.legacy:legacy-support-v4:1.0.0"
|
|
84
97
|
|
|
85
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// [BEGIN] Workaround okhttp/okio compatibility issue
|
|
89
|
-
// Remove when we drop support for SDK 44
|
|
90
|
-
def okhttpPinnedArtifacts = []
|
|
91
|
-
configurations.api.getDependencies().removeIf { it ->
|
|
92
|
-
if (['com.squareup.okhttp3', 'com.squareup.okio'].contains(it.group)) {
|
|
93
|
-
okhttpPinnedArtifacts.add("${it.group}:${it.name}:${it.version}")
|
|
94
|
-
return true
|
|
95
|
-
}
|
|
96
|
-
return false
|
|
97
|
-
}
|
|
98
|
-
okhttpPinnedArtifacts.each { artifact ->
|
|
99
|
-
dependencies.add('compileOnly', artifact)
|
|
100
|
-
dependencies.add('testApi', artifact)
|
|
101
|
-
configurations.all {
|
|
102
|
-
resolutionStrategy.force(artifact)
|
|
103
|
-
}
|
|
98
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
104
99
|
}
|
|
105
|
-
// [END] Workaround okhttp/okio compatibility issue
|
|
@@ -4,8 +4,8 @@ import okhttp3.RequestBody
|
|
|
4
4
|
import okio.Buffer
|
|
5
5
|
import okio.BufferedSink
|
|
6
6
|
import okio.ForwardingSink
|
|
7
|
-
import okio.Okio
|
|
8
7
|
import okio.Sink
|
|
8
|
+
import okio.buffer
|
|
9
9
|
import java.io.IOException
|
|
10
10
|
|
|
11
11
|
@FunctionalInterface
|
|
@@ -45,7 +45,7 @@ class CountingRequestBody(
|
|
|
45
45
|
override fun writeTo(sink: BufferedSink) {
|
|
46
46
|
val countingSink = CountingSink(sink, this, progressListener)
|
|
47
47
|
|
|
48
|
-
val bufferedSink =
|
|
48
|
+
val bufferedSink = countingSink.buffer()
|
|
49
49
|
requestBody.writeTo(bufferedSink)
|
|
50
50
|
bufferedSink.flush()
|
|
51
51
|
}
|
|
@@ -48,6 +48,7 @@ import java.net.CookieHandler
|
|
|
48
48
|
import java.net.URLConnection
|
|
49
49
|
import java.util.*
|
|
50
50
|
import java.util.concurrent.TimeUnit
|
|
51
|
+
import java.util.regex.Pattern
|
|
51
52
|
|
|
52
53
|
import kotlin.math.pow
|
|
53
54
|
|
|
@@ -56,18 +57,15 @@ import okhttp3.Callback
|
|
|
56
57
|
import okhttp3.Headers
|
|
57
58
|
import okhttp3.JavaNetCookieJar
|
|
58
59
|
import okhttp3.MediaType
|
|
60
|
+
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
|
59
61
|
import okhttp3.MultipartBody
|
|
60
62
|
import okhttp3.OkHttpClient
|
|
61
63
|
import okhttp3.Request
|
|
62
64
|
import okhttp3.RequestBody
|
|
65
|
+
import okhttp3.RequestBody.Companion.asRequestBody
|
|
63
66
|
import okhttp3.Response
|
|
64
67
|
import okhttp3.ResponseBody
|
|
65
|
-
|
|
66
|
-
import okio.Buffer
|
|
67
|
-
import okio.BufferedSource
|
|
68
|
-
import okio.ForwardingSource
|
|
69
|
-
import okio.Okio
|
|
70
|
-
import okio.Source
|
|
68
|
+
import okio.*
|
|
71
69
|
|
|
72
70
|
import org.apache.commons.codec.binary.Hex
|
|
73
71
|
import org.apache.commons.codec.digest.DigestUtils
|
|
@@ -82,6 +80,17 @@ private const val MIN_EVENT_DT_MS: Long = 100
|
|
|
82
80
|
private const val HEADER_KEY = "headers"
|
|
83
81
|
private const val DIR_PERMISSIONS_REQUEST_CODE = 5394
|
|
84
82
|
|
|
83
|
+
private fun slashifyFilePath(path: String?): String? {
|
|
84
|
+
return if (path == null) {
|
|
85
|
+
null
|
|
86
|
+
} else if (path.startsWith("file:///")) {
|
|
87
|
+
path
|
|
88
|
+
} else {
|
|
89
|
+
// Ensure leading schema with a triple slash
|
|
90
|
+
Pattern.compile("^file:/*").matcher(path).replaceAll("file:///")
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
85
94
|
// The class needs to be 'open', because it's inherited in expoview
|
|
86
95
|
open class FileSystemModule(
|
|
87
96
|
context: Context,
|
|
@@ -206,12 +215,12 @@ open class FileSystemModule(
|
|
|
206
215
|
|
|
207
216
|
@ExpoMethod
|
|
208
217
|
fun getInfoAsync(_uriStr: String, options: Map<String?, Any?>, promise: Promise) {
|
|
209
|
-
var uriStr = _uriStr
|
|
218
|
+
var uriStr = slashifyFilePath(_uriStr)
|
|
210
219
|
try {
|
|
211
220
|
val uri = Uri.parse(uriStr)
|
|
212
221
|
var absoluteUri = uri
|
|
213
222
|
if (uri.scheme == "file") {
|
|
214
|
-
uriStr = parseFileUri(uriStr)
|
|
223
|
+
uriStr = parseFileUri(uriStr as String)
|
|
215
224
|
absoluteUri = Uri.parse(uriStr)
|
|
216
225
|
}
|
|
217
226
|
ensurePermission(absoluteUri, Permission.READ)
|
|
@@ -277,7 +286,7 @@ open class FileSystemModule(
|
|
|
277
286
|
@ExpoMethod
|
|
278
287
|
fun readAsStringAsync(uriStr: String?, options: Map<String?, Any?>, promise: Promise) {
|
|
279
288
|
try {
|
|
280
|
-
val uri = Uri.parse(uriStr)
|
|
289
|
+
val uri = Uri.parse(slashifyFilePath(uriStr))
|
|
281
290
|
ensurePermission(uri, Permission.READ)
|
|
282
291
|
|
|
283
292
|
// TODO:Bacon: Add more encoding types to match iOS
|
|
@@ -316,7 +325,7 @@ open class FileSystemModule(
|
|
|
316
325
|
@ExpoMethod
|
|
317
326
|
fun writeAsStringAsync(uriStr: String?, string: String?, options: Map<String?, Any?>, promise: Promise) {
|
|
318
327
|
try {
|
|
319
|
-
val uri = Uri.parse(uriStr)
|
|
328
|
+
val uri = Uri.parse(slashifyFilePath(uriStr))
|
|
320
329
|
ensurePermission(uri, Permission.WRITE)
|
|
321
330
|
val encoding = getEncodingFromOptions(options)
|
|
322
331
|
getOutputStream(uri).use { out ->
|
|
@@ -337,7 +346,7 @@ open class FileSystemModule(
|
|
|
337
346
|
@ExpoMethod
|
|
338
347
|
fun deleteAsync(uriStr: String?, options: Map<String?, Any?>, promise: Promise) {
|
|
339
348
|
try {
|
|
340
|
-
val uri = Uri.parse(uriStr)
|
|
349
|
+
val uri = Uri.parse(slashifyFilePath(uriStr))
|
|
341
350
|
val appendedUri = Uri.withAppendedPath(uri, "..")
|
|
342
351
|
ensurePermission(appendedUri, Permission.WRITE, "Location '$uri' isn't deletable.")
|
|
343
352
|
if (uri.scheme == "file") {
|
|
@@ -391,13 +400,13 @@ open class FileSystemModule(
|
|
|
391
400
|
promise.reject("ERR_FILESYSTEM_MISSING_PARAMETER", "`FileSystem.moveAsync` needs a `from` path.")
|
|
392
401
|
return
|
|
393
402
|
}
|
|
394
|
-
val fromUri = Uri.parse(options["from"] as String?)
|
|
403
|
+
val fromUri = Uri.parse(slashifyFilePath(options["from"] as String?))
|
|
395
404
|
ensurePermission(Uri.withAppendedPath(fromUri, ".."), Permission.WRITE, "Location '$fromUri' isn't movable.")
|
|
396
405
|
if (!options.containsKey("to")) {
|
|
397
406
|
promise.reject("ERR_FILESYSTEM_MISSING_PARAMETER", "`FileSystem.moveAsync` needs a `to` path.")
|
|
398
407
|
return
|
|
399
408
|
}
|
|
400
|
-
val toUri = Uri.parse(options["to"] as String?)
|
|
409
|
+
val toUri = Uri.parse(slashifyFilePath(options["to"] as String?))
|
|
401
410
|
ensurePermission(toUri, Permission.WRITE)
|
|
402
411
|
if (fromUri.scheme == "file") {
|
|
403
412
|
val from = fromUri.toFile()
|
|
@@ -435,13 +444,13 @@ open class FileSystemModule(
|
|
|
435
444
|
promise.reject("ERR_FILESYSTEM_MISSING_PARAMETER", "`FileSystem.moveAsync` needs a `from` path.")
|
|
436
445
|
return
|
|
437
446
|
}
|
|
438
|
-
val fromUri = Uri.parse(options["from"] as String?)
|
|
447
|
+
val fromUri = Uri.parse(slashifyFilePath(options["from"] as String?))
|
|
439
448
|
ensurePermission(fromUri, Permission.READ)
|
|
440
449
|
if (!options.containsKey("to")) {
|
|
441
450
|
promise.reject("ERR_FILESYSTEM_MISSING_PARAMETER", "`FileSystem.moveAsync` needs a `to` path.")
|
|
442
451
|
return
|
|
443
452
|
}
|
|
444
|
-
val toUri = Uri.parse(options["to"] as String?)
|
|
453
|
+
val toUri = Uri.parse(slashifyFilePath(options["to"] as String?))
|
|
445
454
|
ensurePermission(toUri, Permission.WRITE)
|
|
446
455
|
when {
|
|
447
456
|
fromUri.scheme == "file" -> {
|
|
@@ -524,7 +533,7 @@ open class FileSystemModule(
|
|
|
524
533
|
@ExpoMethod
|
|
525
534
|
fun makeDirectoryAsync(uriStr: String?, options: Map<String?, Any?>, promise: Promise) {
|
|
526
535
|
try {
|
|
527
|
-
val uri = Uri.parse(uriStr)
|
|
536
|
+
val uri = Uri.parse(slashifyFilePath(uriStr))
|
|
528
537
|
ensurePermission(uri, Permission.WRITE)
|
|
529
538
|
if (uri.scheme == "file") {
|
|
530
539
|
val file = uri.toFile()
|
|
@@ -551,7 +560,7 @@ open class FileSystemModule(
|
|
|
551
560
|
@ExpoMethod
|
|
552
561
|
fun readDirectoryAsync(uriStr: String?, options: Map<String?, Any?>?, promise: Promise) {
|
|
553
562
|
try {
|
|
554
|
-
val uri = Uri.parse(uriStr)
|
|
563
|
+
val uri = Uri.parse(slashifyFilePath(uriStr))
|
|
555
564
|
ensurePermission(uri, Permission.READ)
|
|
556
565
|
if (uri.scheme == "file") {
|
|
557
566
|
val file = uri.toFile()
|
|
@@ -614,7 +623,7 @@ open class FileSystemModule(
|
|
|
614
623
|
@ExpoMethod
|
|
615
624
|
fun getContentUriAsync(uri: String, promise: Promise) {
|
|
616
625
|
try {
|
|
617
|
-
val fileUri = Uri.parse(uri)
|
|
626
|
+
val fileUri = Uri.parse(slashifyFilePath(uri))
|
|
618
627
|
ensurePermission(fileUri, Permission.WRITE)
|
|
619
628
|
ensurePermission(fileUri, Permission.READ)
|
|
620
629
|
fileUri.checkIfFileDirExists()
|
|
@@ -639,7 +648,7 @@ open class FileSystemModule(
|
|
|
639
648
|
@ExpoMethod
|
|
640
649
|
fun readSAFDirectoryAsync(uriStr: String?, options: Map<String?, Any?>?, promise: Promise) {
|
|
641
650
|
try {
|
|
642
|
-
val uri = Uri.parse(uriStr)
|
|
651
|
+
val uri = Uri.parse(slashifyFilePath(uriStr))
|
|
643
652
|
ensurePermission(uri, Permission.READ)
|
|
644
653
|
if (uri.isSAFUri) {
|
|
645
654
|
val file = DocumentFile.fromTreeUri(context, uri)
|
|
@@ -665,7 +674,7 @@ open class FileSystemModule(
|
|
|
665
674
|
@ExpoMethod
|
|
666
675
|
fun makeSAFDirectoryAsync(uriStr: String?, dirName: String?, promise: Promise) {
|
|
667
676
|
try {
|
|
668
|
-
val uri = Uri.parse(uriStr)
|
|
677
|
+
val uri = Uri.parse(slashifyFilePath(uriStr))
|
|
669
678
|
ensurePermission(uri, Permission.WRITE)
|
|
670
679
|
if (!uri.isSAFUri) {
|
|
671
680
|
throw IOException("The URI '$uri' is not a Storage Access Framework URI. Try using FileSystem.makeDirectoryAsync instead.")
|
|
@@ -691,7 +700,7 @@ open class FileSystemModule(
|
|
|
691
700
|
@ExpoMethod
|
|
692
701
|
fun createSAFFileAsync(uriStr: String?, fileName: String?, mimeType: String?, promise: Promise) {
|
|
693
702
|
try {
|
|
694
|
-
val uri = Uri.parse(uriStr)
|
|
703
|
+
val uri = Uri.parse(slashifyFilePath(uriStr))
|
|
695
704
|
ensurePermission(uri, Permission.WRITE)
|
|
696
705
|
if (uri.isSAFUri) {
|
|
697
706
|
val dir = getNearestSAFFile(uri)
|
|
@@ -727,7 +736,7 @@ open class FileSystemModule(
|
|
|
727
736
|
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
|
|
728
737
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
729
738
|
initialFileUrl
|
|
730
|
-
?.let { Uri.parse(it) }
|
|
739
|
+
?.let { Uri.parse(slashifyFilePath(it)) }
|
|
731
740
|
?.let { intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, it) }
|
|
732
741
|
}
|
|
733
742
|
val activityProvider: ActivityProvider by moduleRegistry()
|
|
@@ -747,7 +756,7 @@ open class FileSystemModule(
|
|
|
747
756
|
|
|
748
757
|
private fun createUploadRequest(url: String, fileUriString: String, options: Map<String, Any>, promise: Promise, decorator: RequestBodyDecorator): Request? {
|
|
749
758
|
try {
|
|
750
|
-
val fileUri = Uri.parse(fileUriString)
|
|
759
|
+
val fileUri = Uri.parse(slashifyFilePath(fileUriString))
|
|
751
760
|
ensurePermission(fileUri, Permission.READ)
|
|
752
761
|
fileUri.checkIfFileExists()
|
|
753
762
|
if (!options.containsKey("httpMethod")) {
|
|
@@ -766,7 +775,7 @@ open class FileSystemModule(
|
|
|
766
775
|
}
|
|
767
776
|
|
|
768
777
|
val body = createRequestBody(options, decorator, fileUri.toFile())
|
|
769
|
-
return requestBuilder.method(method, body).build()
|
|
778
|
+
return method?.let { requestBuilder.method(method, body).build() }
|
|
770
779
|
} catch (e: Exception) {
|
|
771
780
|
e.message?.let { Log.e(TAG, it) }
|
|
772
781
|
promise.reject(e)
|
|
@@ -791,7 +800,7 @@ open class FileSystemModule(
|
|
|
791
800
|
} ?: URLConnection.guessContentTypeFromName(file.name)
|
|
792
801
|
|
|
793
802
|
val fieldName = options["fieldName"]?.let { it as String } ?: file.name
|
|
794
|
-
bodyBuilder.addFormDataPart(fieldName, file.name, decorator.decorate(
|
|
803
|
+
bodyBuilder.addFormDataPart(fieldName, file.name, decorator.decorate(file.asRequestBody(mimeType.toMediaTypeOrNull())))
|
|
795
804
|
bodyBuilder.build()
|
|
796
805
|
}
|
|
797
806
|
else -> {
|
|
@@ -816,9 +825,9 @@ open class FileSystemModule(
|
|
|
816
825
|
|
|
817
826
|
override fun onResponse(call: Call, response: Response) {
|
|
818
827
|
val result = Bundle().apply {
|
|
819
|
-
putString("body", response.body
|
|
820
|
-
putInt("status", response.code
|
|
821
|
-
putBundle("headers", translateHeaders(response.headers
|
|
828
|
+
putString("body", response.body?.string())
|
|
829
|
+
putInt("status", response.code)
|
|
830
|
+
putBundle("headers", translateHeaders(response.headers))
|
|
822
831
|
}
|
|
823
832
|
response.close()
|
|
824
833
|
promise.resolve(result)
|
|
@@ -866,7 +875,7 @@ open class FileSystemModule(
|
|
|
866
875
|
taskHandlers[uuid] = TaskHandler(call)
|
|
867
876
|
call.enqueue(object : Callback {
|
|
868
877
|
override fun onFailure(call: Call, e: IOException) {
|
|
869
|
-
if (call.isCanceled) {
|
|
878
|
+
if (call.isCanceled()) {
|
|
870
879
|
promise.resolve(null)
|
|
871
880
|
return
|
|
872
881
|
}
|
|
@@ -876,11 +885,11 @@ open class FileSystemModule(
|
|
|
876
885
|
|
|
877
886
|
override fun onResponse(call: Call, response: Response) {
|
|
878
887
|
val result = Bundle()
|
|
879
|
-
val body = response.body
|
|
888
|
+
val body = response.body
|
|
880
889
|
result.apply {
|
|
881
890
|
putString("body", body?.string())
|
|
882
|
-
putInt("status", response.code
|
|
883
|
-
putBundle("headers", translateHeaders(response.headers
|
|
891
|
+
putInt("status", response.code)
|
|
892
|
+
putBundle("headers", translateHeaders(response.headers))
|
|
884
893
|
}
|
|
885
894
|
response.close()
|
|
886
895
|
promise.resolve(result)
|
|
@@ -891,7 +900,7 @@ open class FileSystemModule(
|
|
|
891
900
|
@ExpoMethod
|
|
892
901
|
fun downloadAsync(url: String, uriStr: String?, options: Map<String?, Any?>?, promise: Promise) {
|
|
893
902
|
try {
|
|
894
|
-
val uri = Uri.parse(uriStr)
|
|
903
|
+
val uri = Uri.parse(slashifyFilePath(uriStr))
|
|
895
904
|
ensurePermission(uri, Permission.WRITE)
|
|
896
905
|
uri.checkIfFileDirExists()
|
|
897
906
|
when {
|
|
@@ -900,10 +909,10 @@ open class FileSystemModule(
|
|
|
900
909
|
val resources = context.resources
|
|
901
910
|
val packageName = context.packageName
|
|
902
911
|
val resourceId = resources.getIdentifier(url, "raw", packageName)
|
|
903
|
-
val bufferedSource =
|
|
912
|
+
val bufferedSource = context.resources.openRawResource(resourceId).source().buffer()
|
|
904
913
|
val file = uri.toFile()
|
|
905
914
|
file.delete()
|
|
906
|
-
val sink =
|
|
915
|
+
val sink = file.sink().buffer()
|
|
907
916
|
sink.writeAll(bufferedSource)
|
|
908
917
|
sink.close()
|
|
909
918
|
val result = Bundle()
|
|
@@ -934,13 +943,13 @@ open class FileSystemModule(
|
|
|
934
943
|
override fun onResponse(call: Call, response: Response) {
|
|
935
944
|
val file = uri.toFile()
|
|
936
945
|
file.delete()
|
|
937
|
-
val sink =
|
|
938
|
-
sink.writeAll(response.body
|
|
946
|
+
val sink = file.sink().buffer()
|
|
947
|
+
sink.writeAll(response.body!!.source())
|
|
939
948
|
sink.close()
|
|
940
949
|
val result = Bundle().apply {
|
|
941
950
|
putString("uri", Uri.fromFile(file).toString())
|
|
942
|
-
putInt("status", response.code
|
|
943
|
-
putBundle("headers", translateHeaders(response.headers
|
|
951
|
+
putInt("status", response.code)
|
|
952
|
+
putBundle("headers", translateHeaders(response.headers))
|
|
944
953
|
if (options?.get("md5") == true) {
|
|
945
954
|
putString("md5", md5(file))
|
|
946
955
|
}
|
|
@@ -970,7 +979,7 @@ open class FileSystemModule(
|
|
|
970
979
|
@ExpoMethod
|
|
971
980
|
fun downloadResumableStartAsync(url: String, fileUriStr: String, uuid: String, options: Map<String?, Any?>, resumeData: String?, promise: Promise) {
|
|
972
981
|
try {
|
|
973
|
-
val fileUri = Uri.parse(fileUriStr)
|
|
982
|
+
val fileUri = Uri.parse(slashifyFilePath(fileUriStr))
|
|
974
983
|
fileUri.checkIfFileDirExists()
|
|
975
984
|
if (fileUri.scheme != "file") {
|
|
976
985
|
throw IOException("Unsupported scheme for location '$fileUri'.")
|
|
@@ -1003,7 +1012,7 @@ open class FileSystemModule(
|
|
|
1003
1012
|
?.addNetworkInterceptor { chain ->
|
|
1004
1013
|
val originalResponse = chain.proceed(chain.request())
|
|
1005
1014
|
originalResponse.newBuilder()
|
|
1006
|
-
.body(ProgressResponseBody(originalResponse.body
|
|
1015
|
+
.body(ProgressResponseBody(originalResponse.body, progressListener))
|
|
1007
1016
|
.build()
|
|
1008
1017
|
}
|
|
1009
1018
|
?.build()
|
|
@@ -1012,7 +1021,7 @@ open class FileSystemModule(
|
|
|
1012
1021
|
return
|
|
1013
1022
|
}
|
|
1014
1023
|
val requestBuilder = Request.Builder()
|
|
1015
|
-
resumeData
|
|
1024
|
+
resumeData?.let {
|
|
1016
1025
|
requestBuilder.addHeader("Range", "bytes=$it-")
|
|
1017
1026
|
}
|
|
1018
1027
|
if (options.containsKey(HEADER_KEY)) {
|
|
@@ -1098,7 +1107,7 @@ open class FileSystemModule(
|
|
|
1098
1107
|
val options = params[0]?.options
|
|
1099
1108
|
return try {
|
|
1100
1109
|
val response = call!!.execute()
|
|
1101
|
-
val responseBody = response.body
|
|
1110
|
+
val responseBody = response.body
|
|
1102
1111
|
val input = BufferedInputStream(responseBody!!.byteStream())
|
|
1103
1112
|
val output = FileOutputStream(file, isResume == true)
|
|
1104
1113
|
val data = ByteArray(1024)
|
|
@@ -1108,15 +1117,15 @@ open class FileSystemModule(
|
|
|
1108
1117
|
}
|
|
1109
1118
|
val result = Bundle().apply {
|
|
1110
1119
|
putString("uri", Uri.fromFile(file).toString())
|
|
1111
|
-
putInt("status", response.code
|
|
1112
|
-
putBundle("headers", translateHeaders(response.headers
|
|
1120
|
+
putInt("status", response.code)
|
|
1121
|
+
putBundle("headers", translateHeaders(response.headers))
|
|
1113
1122
|
options?.get("md5").takeIf { it == true }?.let { putString("md5", file?.let { md5(it) }) }
|
|
1114
1123
|
}
|
|
1115
1124
|
response.close()
|
|
1116
1125
|
promise?.resolve(result)
|
|
1117
1126
|
null
|
|
1118
1127
|
} catch (e: Exception) {
|
|
1119
|
-
if (call?.isCanceled == true) {
|
|
1128
|
+
if (call?.isCanceled() == true) {
|
|
1120
1129
|
promise?.resolve(null)
|
|
1121
1130
|
return null
|
|
1122
1131
|
}
|
|
@@ -1139,7 +1148,7 @@ open class FileSystemModule(
|
|
|
1139
1148
|
override fun contentLength(): Long = responseBody?.contentLength() ?: -1
|
|
1140
1149
|
|
|
1141
1150
|
override fun source(): BufferedSource =
|
|
1142
|
-
bufferedSource ?:
|
|
1151
|
+
bufferedSource ?: source(responseBody!!.source()).buffer()
|
|
1143
1152
|
|
|
1144
1153
|
private fun source(source: Source): Source {
|
|
1145
1154
|
return object : ForwardingSource(source) {
|
|
@@ -1304,7 +1313,7 @@ open class FileSystemModule(
|
|
|
1304
1313
|
// Copied out of React Native's `NetworkingModule.java`
|
|
1305
1314
|
private fun translateHeaders(headers: Headers): Bundle {
|
|
1306
1315
|
val responseHeaders = Bundle()
|
|
1307
|
-
for (i in 0 until headers.size
|
|
1316
|
+
for (i in 0 until headers.size) {
|
|
1308
1317
|
val headerName = headers.name(i)
|
|
1309
1318
|
// multiple values for the same header
|
|
1310
1319
|
if (responseHeaders[headerName] != null) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExponentFileSystem.d.ts","sourceRoot":"","sources":["../src/ExponentFileSystem.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;;AAU9D,wBAA0D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExponentFileSystem.web.d.ts","sourceRoot":"","sources":["../src/ExponentFileSystem.web.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExponentFileSystemShim.d.ts","sourceRoot":"","sources":["../src/ExponentFileSystemShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,QAAA,MAAM,cAAc,EAAE,wBAkBrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/build/FileSystem.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileSystem.d.ts","sourceRoot":"","sources":["../src/FileSystem.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,wBAAwB,EACxB,qCAAqC,EACrC,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,kCAAkC,EAClC,wBAAwB,EACxB,2CAA2C,EAC3C,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EAEpB,cAAc,EACd,cAAc,EACf,MAAM,oBAAoB,CAAC;AAU5B,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,wBAAwB,EACxB,2CAA2C,EAC3C,kCAAkC,EAClC,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,qCAAqC,EACrC,cAAc,EACd,cAAc,GACf,CAAC;AASF,eAAO,MAAM,iBAAiB,eAA6D,CAAC;AAC5F,eAAO,MAAM,cAAc,eAA0D,CAAC;AAEtF,eAAO,MAAQ,aAAa,iBAAE,eAAe,eAAuB,CAAC;AAErE,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC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5B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C"}
|
package/build/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
Binary file
|
|
Binary file
|
package/ios/EXFileSystem.xcframework/ios-arm64_x86_64-simulator/EXFileSystem.framework/EXFileSystem
CHANGED
|
Binary file
|
package/ios/EXFileSystem.xcframework/ios-arm64_x86_64-simulator/EXFileSystem.framework/Info.plist
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-file-system",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "Provides access to the local file system on the device.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"expo-module-scripts": "^2.0.0",
|
|
43
|
-
"jest-expo": "~
|
|
43
|
+
"jest-expo": "~45.0.0-beta.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"expo": "*"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
|
|
49
49
|
}
|