expo-file-system 19.1.0-canary-20250930-9dc59d3 → 19.1.0-canary-20251031-b135dff
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 +24 -2
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/filesystem/FileSystemDirectory.kt +1 -1
- package/android/src/main/java/expo/modules/filesystem/FileSystemExceptions.kt +5 -0
- package/android/src/main/java/expo/modules/filesystem/FileSystemFile.kt +6 -0
- package/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt +4 -0
- package/android/src/main/java/expo/modules/filesystem/FileSystemPath.kt +6 -16
- package/android/src/main/java/expo/modules/filesystem/unifiedfile/AssetFile.kt +19 -0
- package/android/src/main/java/expo/modules/filesystem/unifiedfile/JavaFile.kt +17 -0
- package/android/src/main/java/expo/modules/filesystem/unifiedfile/SAFDocumentFile.kt +14 -0
- package/android/src/main/java/expo/modules/filesystem/unifiedfile/UnifiedFileInterface.kt +3 -0
- package/build/ExpoFileSystem.types.d.ts +6 -1
- package/build/ExpoFileSystem.types.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/FileSystemModule.swift +12 -0
- package/ios/FileSystemPath.swift +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff-sources.jar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff-sources.jar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff-sources.jar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff-sources.jar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff-sources.jar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.aar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.aar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.aar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.aar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.module → 19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.module} +22 -22
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.pom → 19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20251031-b135dff/expo.modules.filesystem-19.1.0-canary-20251031-b135dff.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/plugin/build/withFileSystem.d.ts +5 -1
- package/plugin/build/withFileSystem.js +13 -2
- package/plugin/src/withFileSystem.ts +25 -3
- package/src/ExpoFileSystem.types.ts +6 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3-sources.jar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3-sources.jar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3-sources.jar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3-sources.jar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3-sources.jar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.aar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.aar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.aar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.aar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.1.0-canary-20250930-9dc59d3/expo.modules.filesystem-19.1.0-canary-20250930-9dc59d3.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,15 +6,37 @@
|
|
|
6
6
|
|
|
7
7
|
### 🎉 New features
|
|
8
8
|
|
|
9
|
+
- [Android] Add contentUri property. ([#40002](https://github.com/expo/expo/pull/40002) by [@aleqsio](https://github.com/aleqsio))
|
|
10
|
+
|
|
11
|
+
### 🐛 Bug fixes
|
|
12
|
+
|
|
13
|
+
- [iOS] Add missing `createFile` and `createDirectory` methods. ([#40314](https://github.com/expo/expo/pull/40314) by [@jakex7](https://github.com/jakex7))
|
|
14
|
+
|
|
15
|
+
### 💡 Others
|
|
16
|
+
|
|
17
|
+
## 19.0.17 - 2025-10-09
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- [Android] Fix recursive file deletion. ([#40248](https://github.com/expo/expo/pull/40248) by [@aleqsio](https://github.com/aleqsio))
|
|
22
|
+
|
|
23
|
+
## 19.0.16 - 2025-10-01
|
|
24
|
+
|
|
25
|
+
### 🎉 New features
|
|
26
|
+
|
|
9
27
|
- Add write options for base64 encoded bytes. ([#39963](https://github.com/expo/expo/pull/39963) by [@aleqsio](https://github.com/aleqsio))
|
|
10
|
-
-
|
|
28
|
+
- [iOS] Add file sharing config options ([#39286](https://github.com/expo/expo/pull/39286) by [@kosmydel](https://github.com/kosmydel))
|
|
11
29
|
|
|
12
30
|
### 🐛 Bug fixes
|
|
13
31
|
|
|
14
32
|
- Fix typedoc in the File class. ([#40064](https://github.com/expo/expo/pull/40064) by [@aleqsio](https://github.com/aleqsio))
|
|
15
33
|
- [Android] Fix getContentUri. ([#40001](https://github.com/expo/expo/pull/40001) by [@aleqsio](https://github.com/aleqsio))
|
|
16
34
|
|
|
17
|
-
|
|
35
|
+
## 19.0.15 - 2025-09-22
|
|
36
|
+
|
|
37
|
+
### 🎉 New features
|
|
38
|
+
|
|
39
|
+
- add `idempotent` option to `downloadFileAsync` ([#39681](https://github.com/expo/expo/pull/39681) by [@vonovak](https://github.com/vonovak))
|
|
18
40
|
|
|
19
41
|
## 19.0.14 — 2025-09-13
|
|
20
42
|
|
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '19.1.0-canary-
|
|
7
|
+
version = '19.1.0-canary-20251031-b135dff'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.filesystem"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 30
|
|
13
|
-
versionName "19.1.0-canary-
|
|
13
|
+
versionName "19.1.0-canary-20251031-b135dff"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -56,10 +56,10 @@ class FileSystemDirectory(uri: Uri) : FileSystemPath(uri) {
|
|
|
56
56
|
if (!needsCreation(options)) {
|
|
57
57
|
return
|
|
58
58
|
}
|
|
59
|
-
validateCanCreate(options)
|
|
60
59
|
if (uri.isContentUri) {
|
|
61
60
|
throw UnableToCreateException("create function does not work with SAF Uris, use `createDirectory` and `createFile` instead")
|
|
62
61
|
}
|
|
62
|
+
validateCanCreate(options)
|
|
63
63
|
if (options.overwrite && file.exists()) {
|
|
64
64
|
file.delete()
|
|
65
65
|
}
|
|
@@ -44,6 +44,11 @@ internal class UnableToWriteHandleException(reason: String) :
|
|
|
44
44
|
"Unable to write to a file handle: '$reason'"
|
|
45
45
|
)
|
|
46
46
|
|
|
47
|
+
internal class MissingAppContextException :
|
|
48
|
+
CodedException(
|
|
49
|
+
"The app context is missing."
|
|
50
|
+
)
|
|
51
|
+
|
|
47
52
|
internal class PickerCancelledException :
|
|
48
53
|
CodedException("The file picker was cancelled by the user")
|
|
49
54
|
|
|
@@ -126,6 +126,12 @@ class FileSystemFile(uri: Uri) : FileSystemPath(uri) {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
fun asContentUri(): Uri {
|
|
130
|
+
validateType()
|
|
131
|
+
validatePermission(Permission.READ)
|
|
132
|
+
return file.getContentUri(appContext ?: throw MissingAppContextException())
|
|
133
|
+
}
|
|
134
|
+
|
|
129
135
|
@OptIn(ExperimentalStdlibApi::class)
|
|
130
136
|
val md5: String get() {
|
|
131
137
|
validatePermission(Permission.READ)
|
|
@@ -62,23 +62,13 @@ abstract class FileSystemPath(var uri: Uri) : SharedObject() {
|
|
|
62
62
|
throw UnableToDeleteException("uri '${file.uri}' does not exist")
|
|
63
63
|
}
|
|
64
64
|
if (file.isDirectory()) {
|
|
65
|
-
file.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
JavaFile(child.uri).delete()
|
|
72
|
-
}
|
|
73
|
-
} else {
|
|
74
|
-
if (!child.delete()) {
|
|
75
|
-
throw UnableToDeleteException("failed to delete '${child.uri}'")
|
|
76
|
-
}
|
|
77
|
-
}
|
|
65
|
+
if (!file.deleteRecursively()) {
|
|
66
|
+
throw UnableToDeleteException("failed to delete '${file.uri}'")
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
if (!file.delete()) {
|
|
70
|
+
throw UnableToDeleteException("failed to delete '${file.uri}'")
|
|
78
71
|
}
|
|
79
|
-
}
|
|
80
|
-
if (!file.delete()) {
|
|
81
|
-
throw UnableToDeleteException("failed to delete '${file.uri}'")
|
|
82
72
|
}
|
|
83
73
|
}
|
|
84
74
|
|
|
@@ -4,7 +4,9 @@ import android.content.Context
|
|
|
4
4
|
import android.net.Uri
|
|
5
5
|
import android.webkit.MimeTypeMap
|
|
6
6
|
import androidx.core.net.toUri
|
|
7
|
+
import expo.modules.kotlin.AppContext
|
|
7
8
|
import java.io.File
|
|
9
|
+
import java.io.FileOutputStream
|
|
8
10
|
import java.io.InputStream
|
|
9
11
|
import java.io.OutputStream
|
|
10
12
|
|
|
@@ -25,6 +27,21 @@ class AssetFile(private val context: Context, override val uri: Uri) : UnifiedFi
|
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
|
|
30
|
+
// Cache the content URI to avoid redundant file writes – assets are read-only
|
|
31
|
+
var contentUri: Uri? = null
|
|
32
|
+
override fun getContentUri(appContext: AppContext): Uri {
|
|
33
|
+
inputStream().use { inputStream ->
|
|
34
|
+
val outputFile = File(context.cacheDir, "expo_shared_assets/$fileName")
|
|
35
|
+
outputFile.parentFile?.mkdirs() // Create directories if needed
|
|
36
|
+
FileOutputStream(outputFile).use { outputStream ->
|
|
37
|
+
inputStream.copyTo(outputStream)
|
|
38
|
+
}
|
|
39
|
+
val newContentUri = JavaFile(outputFile.toUri()).getContentUri(appContext)
|
|
40
|
+
contentUri = newContentUri
|
|
41
|
+
return newContentUri
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
28
45
|
override val parentFile: UnifiedFileInterface?
|
|
29
46
|
get() {
|
|
30
47
|
val currentPath = uri.path.orEmpty()
|
|
@@ -48,6 +65,8 @@ class AssetFile(private val context: Context, override val uri: Uri) : UnifiedFi
|
|
|
48
65
|
|
|
49
66
|
override fun delete(): Boolean = throw UnsupportedOperationException("Asset files are not writable and cannot be deleted")
|
|
50
67
|
|
|
68
|
+
override fun deleteRecursively(): Boolean = throw UnsupportedOperationException("Asset files are not writable and cannot be deleted")
|
|
69
|
+
|
|
51
70
|
override fun listFilesAsUnified(): List<UnifiedFileInterface> {
|
|
52
71
|
val list = context.assets.list(path)
|
|
53
72
|
return list?.map { name -> AssetFile(context, File(path, name).toUri()) as UnifiedFileInterface } ?: emptyList()
|
|
@@ -3,7 +3,9 @@ package expo.modules.filesystem.unifiedfile
|
|
|
3
3
|
import android.net.Uri
|
|
4
4
|
import android.os.Build
|
|
5
5
|
import android.webkit.MimeTypeMap
|
|
6
|
+
import androidx.core.content.FileProvider
|
|
6
7
|
import androidx.core.net.toUri
|
|
8
|
+
import expo.modules.kotlin.AppContext
|
|
7
9
|
import java.io.File
|
|
8
10
|
import java.io.FileInputStream
|
|
9
11
|
import java.io.FileOutputStream
|
|
@@ -31,6 +33,21 @@ class JavaFile(override val uri: Uri) : UnifiedFileInterface, File(URI.create(ur
|
|
|
31
33
|
return JavaFile(childFile.toUri())
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
override fun deleteRecursively(): Boolean {
|
|
37
|
+
if (isDirectory) {
|
|
38
|
+
listFiles()?.forEach { it.deleteRecursively() }
|
|
39
|
+
}
|
|
40
|
+
return super<File>.delete()
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
override fun getContentUri(appContext: AppContext): Uri {
|
|
44
|
+
return FileProvider.getUriForFile(
|
|
45
|
+
appContext.throwingActivity.application,
|
|
46
|
+
"${appContext.throwingActivity.application.packageName}.FileSystemFileProvider",
|
|
47
|
+
this
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
34
51
|
override fun listFilesAsUnified(): List<UnifiedFileInterface> =
|
|
35
52
|
super<File>.listFiles()?.map { JavaFile(it.toUri()) } ?: emptyList()
|
|
36
53
|
|
|
@@ -3,6 +3,7 @@ package expo.modules.filesystem.unifiedfile
|
|
|
3
3
|
import android.content.Context
|
|
4
4
|
import android.net.Uri
|
|
5
5
|
import androidx.documentfile.provider.DocumentFile
|
|
6
|
+
import expo.modules.kotlin.AppContext
|
|
6
7
|
import java.io.InputStream
|
|
7
8
|
import java.io.OutputStream
|
|
8
9
|
|
|
@@ -45,6 +46,8 @@ class SAFDocumentFile(private val context: Context, override val uri: Uri) : Uni
|
|
|
45
46
|
|
|
46
47
|
override fun delete(): Boolean = documentFile?.delete() == true
|
|
47
48
|
|
|
49
|
+
override fun deleteRecursively(): Boolean = documentFile?.deleteRecursively() == true
|
|
50
|
+
|
|
48
51
|
override fun listFilesAsUnified(): List<UnifiedFileInterface> =
|
|
49
52
|
documentFile?.listFiles()?.map { SAFDocumentFile(context, it.uri) } ?: emptyList()
|
|
50
53
|
|
|
@@ -58,6 +61,10 @@ class SAFDocumentFile(private val context: Context, override val uri: Uri) : Uni
|
|
|
58
61
|
override val fileName: String?
|
|
59
62
|
get() = documentFile?.name
|
|
60
63
|
|
|
64
|
+
override fun getContentUri(appContext: AppContext): Uri {
|
|
65
|
+
return uri
|
|
66
|
+
}
|
|
67
|
+
|
|
61
68
|
override val creationTime: Long? get() {
|
|
62
69
|
// It seems there's no way to get this
|
|
63
70
|
return null
|
|
@@ -88,3 +95,10 @@ class SAFDocumentFile(private val context: Context, override val uri: Uri) : Uni
|
|
|
88
95
|
}
|
|
89
96
|
}
|
|
90
97
|
}
|
|
98
|
+
|
|
99
|
+
fun DocumentFile.deleteRecursively(): Boolean {
|
|
100
|
+
if (isDirectory) {
|
|
101
|
+
listFiles().forEach { it.deleteRecursively() }
|
|
102
|
+
}
|
|
103
|
+
return delete()
|
|
104
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package expo.modules.filesystem.unifiedfile
|
|
2
2
|
|
|
3
3
|
import android.net.Uri
|
|
4
|
+
import expo.modules.kotlin.AppContext
|
|
4
5
|
|
|
5
6
|
interface UnifiedFileInterface {
|
|
6
7
|
fun exists(): Boolean
|
|
@@ -10,12 +11,14 @@ interface UnifiedFileInterface {
|
|
|
10
11
|
fun createFile(mimeType: String, displayName: String): UnifiedFileInterface?
|
|
11
12
|
fun createDirectory(displayName: String): UnifiedFileInterface?
|
|
12
13
|
fun delete(): Boolean
|
|
14
|
+
fun deleteRecursively(): Boolean
|
|
13
15
|
fun listFilesAsUnified(): List<UnifiedFileInterface>
|
|
14
16
|
val uri: Uri
|
|
15
17
|
val type: String?
|
|
16
18
|
fun lastModified(): Long?
|
|
17
19
|
val creationTime: Long?
|
|
18
20
|
val fileName: String?
|
|
21
|
+
fun getContentUri(appContext: AppContext): Uri
|
|
19
22
|
fun outputStream(): java.io.OutputStream
|
|
20
23
|
fun inputStream(): java.io.InputStream
|
|
21
24
|
fun length(): Long
|
|
@@ -204,7 +204,7 @@ export declare class File {
|
|
|
204
204
|
* Writes content to the file.
|
|
205
205
|
* @param content The content to write into the file.
|
|
206
206
|
*/
|
|
207
|
-
write(content: string | Uint8Array, options
|
|
207
|
+
write(content: string | Uint8Array, options?: FileWriteOptions): void;
|
|
208
208
|
/**
|
|
209
209
|
* Deletes a file.
|
|
210
210
|
*
|
|
@@ -297,6 +297,11 @@ export declare class File {
|
|
|
297
297
|
* A mime type of the file. An empty string if the file does not exist, or it cannot be read.
|
|
298
298
|
*/
|
|
299
299
|
type: string;
|
|
300
|
+
/**
|
|
301
|
+
* A content URI to the file that can be shared to external applications.
|
|
302
|
+
* @platform android
|
|
303
|
+
*/
|
|
304
|
+
contentUri: string;
|
|
300
305
|
}
|
|
301
306
|
export declare class FileHandle {
|
|
302
307
|
close(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoFileSystem.types.d.ts","sourceRoot":"","sources":["../src/ExpoFileSystem.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,aAAa,CAAC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AAS,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC;IAKlD,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAMnC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAItB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC"}
|
package/expo-module.config.json
CHANGED
|
@@ -335,6 +335,18 @@ public final class FileSystemModule: Module {
|
|
|
335
335
|
try directory.listAsRecords()
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
+
Function("createFile") { (directory, name: String, content: String?) in
|
|
339
|
+
let file = FileSystemFile(url: directory.url.appendingPathComponent(name))
|
|
340
|
+
try file.create(CreateOptions())
|
|
341
|
+
return file
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
Function("createDirectory") { (directory, name: String) in
|
|
345
|
+
let newDirectory = FileSystemDirectory(url: directory.url.appendingPathComponent(name))
|
|
346
|
+
try newDirectory.create(CreateOptions())
|
|
347
|
+
return newDirectory
|
|
348
|
+
}
|
|
349
|
+
|
|
338
350
|
Property("uri") { directory in
|
|
339
351
|
return directory.url.absoluteString
|
|
340
352
|
}
|
package/ios/FileSystemPath.swift
CHANGED
|
@@ -25,7 +25,7 @@ internal class FileSystemPath: SharedObject {
|
|
|
25
25
|
|
|
26
26
|
func validateCanCreate(_ options: CreateOptions) throws {
|
|
27
27
|
if try !options.overwrite && exists {
|
|
28
|
-
throw FileAlreadyExistsException(
|
|
28
|
+
throw FileAlreadyExistsException(url.absoluteString)
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d3f99d83252bbc8fcf013f07d3d86ea8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
464959bdf2015e626f82e9af6c6c28a6498240e3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4177d9bd9a22a528b97cc2f2bd7ba47f6cbf7fb1c09d93a1cacdce6f553b05d6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6cac7b2fa58a18696e1468e4e9afe7e6092ca1a404351400345349e028cbaeda51386f4303d05372a2be2baf8de77fd97490ea91caa74bfc2a8cfe7b62619bfe
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b5b686523c997b2c2db9bdcfbec3bd4f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
29d197f141c1824915acd933d598b94823c3407f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1f23e461e8a94f5149b5b22ecd2e6dec9a15a5b0a9f5656a86bfaa586a998e42
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9e2285f94d47b66eac6eacae8f85ba8179d0d934f648546bdfee4242cd4282663bf08c2598bdc6b6e9ba2c9f62117dc134b171c38a2350833402f4259ef83f13
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.filesystem",
|
|
6
|
-
"version": "19.1.0-canary-
|
|
6
|
+
"version": "19.1.0-canary-20251031-b135dff",
|
|
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.1.0-canary-
|
|
79
|
-
"url": "expo.modules.filesystem-19.1.0-canary-
|
|
80
|
-
"size":
|
|
81
|
-
"sha512": "
|
|
82
|
-
"sha256": "
|
|
83
|
-
"sha1": "
|
|
84
|
-
"md5": "
|
|
78
|
+
"name": "expo.modules.filesystem-19.1.0-canary-20251031-b135dff.aar",
|
|
79
|
+
"url": "expo.modules.filesystem-19.1.0-canary-20251031-b135dff.aar",
|
|
80
|
+
"size": 393117,
|
|
81
|
+
"sha512": "9e2285f94d47b66eac6eacae8f85ba8179d0d934f648546bdfee4242cd4282663bf08c2598bdc6b6e9ba2c9f62117dc134b171c38a2350833402f4259ef83f13",
|
|
82
|
+
"sha256": "1f23e461e8a94f5149b5b22ecd2e6dec9a15a5b0a9f5656a86bfaa586a998e42",
|
|
83
|
+
"sha1": "29d197f141c1824915acd933d598b94823c3407f",
|
|
84
|
+
"md5": "b5b686523c997b2c2db9bdcfbec3bd4f"
|
|
85
85
|
}
|
|
86
86
|
]
|
|
87
87
|
},
|
|
@@ -153,13 +153,13 @@
|
|
|
153
153
|
],
|
|
154
154
|
"files": [
|
|
155
155
|
{
|
|
156
|
-
"name": "expo.modules.filesystem-19.1.0-canary-
|
|
157
|
-
"url": "expo.modules.filesystem-19.1.0-canary-
|
|
158
|
-
"size":
|
|
159
|
-
"sha512": "
|
|
160
|
-
"sha256": "
|
|
161
|
-
"sha1": "
|
|
162
|
-
"md5": "
|
|
156
|
+
"name": "expo.modules.filesystem-19.1.0-canary-20251031-b135dff.aar",
|
|
157
|
+
"url": "expo.modules.filesystem-19.1.0-canary-20251031-b135dff.aar",
|
|
158
|
+
"size": 393117,
|
|
159
|
+
"sha512": "9e2285f94d47b66eac6eacae8f85ba8179d0d934f648546bdfee4242cd4282663bf08c2598bdc6b6e9ba2c9f62117dc134b171c38a2350833402f4259ef83f13",
|
|
160
|
+
"sha256": "1f23e461e8a94f5149b5b22ecd2e6dec9a15a5b0a9f5656a86bfaa586a998e42",
|
|
161
|
+
"sha1": "29d197f141c1824915acd933d598b94823c3407f",
|
|
162
|
+
"md5": "b5b686523c997b2c2db9bdcfbec3bd4f"
|
|
163
163
|
}
|
|
164
164
|
]
|
|
165
165
|
},
|
|
@@ -173,13 +173,13 @@
|
|
|
173
173
|
},
|
|
174
174
|
"files": [
|
|
175
175
|
{
|
|
176
|
-
"name": "expo.modules.filesystem-19.1.0-canary-
|
|
177
|
-
"url": "expo.modules.filesystem-19.1.0-canary-
|
|
178
|
-
"size":
|
|
179
|
-
"sha512": "
|
|
180
|
-
"sha256": "
|
|
181
|
-
"sha1": "
|
|
182
|
-
"md5": "
|
|
176
|
+
"name": "expo.modules.filesystem-19.1.0-canary-20251031-b135dff-sources.jar",
|
|
177
|
+
"url": "expo.modules.filesystem-19.1.0-canary-20251031-b135dff-sources.jar",
|
|
178
|
+
"size": 29329,
|
|
179
|
+
"sha512": "6cac7b2fa58a18696e1468e4e9afe7e6092ca1a404351400345349e028cbaeda51386f4303d05372a2be2baf8de77fd97490ea91caa74bfc2a8cfe7b62619bfe",
|
|
180
|
+
"sha256": "4177d9bd9a22a528b97cc2f2bd7ba47f6cbf7fb1c09d93a1cacdce6f553b05d6",
|
|
181
|
+
"sha1": "464959bdf2015e626f82e9af6c6c28a6498240e3",
|
|
182
|
+
"md5": "d3f99d83252bbc8fcf013f07d3d86ea8"
|
|
183
183
|
}
|
|
184
184
|
]
|
|
185
185
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
032da557f1c7848f69370f232a98638f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f98298beb8193ff98e963014271b6a43b24e61a8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6d71dc848370e7475fd37fd9660ec203979fe6efdedeafc60203b72961ee187b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c5ec9307393b30d803f5d0d72c27d5569bb9bd4108fd1d0ca30280f09b0edfad24a83c4aa3cf5bb8d6f988b10e04d48383fa0c97a2fe06af534075c6850c67f8
|
|
@@ -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.1.0-canary-
|
|
12
|
+
<version>19.1.0-canary-20251031-b135dff</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
|
+
461463850030acdb50cff22a84cc2b26
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6e2163add1fcbfa6b661deddfac40c41e68ece86
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ee561391f8e57f873066861a5df5ab88aff3f3af368af817728d75eaf379fd1a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7b7383ecb32902c973fb44a571e3dc6b65d836b9cf252d0b1a635511dddac09928a7d38e9c46d025435fe36651ce3ffc4bb100aaebd8ab352389c30e48181904
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.filesystem</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>19.1.0-canary-
|
|
7
|
-
<release>19.1.0-canary-
|
|
6
|
+
<latest>19.1.0-canary-20251031-b135dff</latest>
|
|
7
|
+
<release>19.1.0-canary-20251031-b135dff</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>19.1.0-canary-
|
|
9
|
+
<version>19.1.0-canary-20251031-b135dff</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20251031073956</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2565576a760e86ae95838ffaa4887d81
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7ade21b26e20aa5118d3846d72225d891c8a608b
|
package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
86940814ac92a1191ebe609e367caa83864900e5dec470ae5425783fe9297414
|
package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha512
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4afefff78a835506f5b59c3136124ffb0f4a284fb3e8259a14232a7a7339d8c3f1a41c0920b0cda46152c5a2e3704399f27a00673417f030ee83abf6caf76e9e
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-file-system",
|
|
3
|
-
"version": "19.1.0-canary-
|
|
3
|
+
"version": "19.1.0-canary-20251031-b135dff",
|
|
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",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"preset": "expo-module-scripts"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"expo-module-scripts": "5.0.8-canary-
|
|
39
|
-
"jest-expo": "55.0.0-canary-
|
|
38
|
+
"expo-module-scripts": "5.0.8-canary-20251031-b135dff",
|
|
39
|
+
"jest-expo": "55.0.0-canary-20251031-b135dff"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"expo": "55.0.0-canary-
|
|
42
|
+
"expo": "55.0.0-canary-20251031-b135dff",
|
|
43
43
|
"react-native": "*"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ConfigPlugin } from 'expo/config-plugins';
|
|
2
|
-
|
|
2
|
+
type FileSystemProps = {
|
|
3
|
+
supportsOpeningDocumentsInPlace?: boolean;
|
|
4
|
+
enableFileSharing?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: ConfigPlugin<FileSystemProps>;
|
|
3
7
|
export default _default;
|
|
@@ -2,11 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const config_plugins_1 = require("expo/config-plugins");
|
|
4
4
|
const pkg = require('expo-file-system/package.json');
|
|
5
|
-
const withFileSystem = (config) => {
|
|
6
|
-
|
|
5
|
+
const withFileSystem = (config, options = {}) => {
|
|
6
|
+
// Apply Android permissions
|
|
7
|
+
config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [
|
|
7
8
|
'android.permission.READ_EXTERNAL_STORAGE',
|
|
8
9
|
'android.permission.WRITE_EXTERNAL_STORAGE',
|
|
9
10
|
'android.permission.INTERNET',
|
|
10
11
|
]);
|
|
12
|
+
// Apply iOS modifications
|
|
13
|
+
return (0, config_plugins_1.withInfoPlist)(config, (config) => {
|
|
14
|
+
if ('supportsOpeningDocumentsInPlace' in options) {
|
|
15
|
+
config.modResults.LSSupportsOpeningDocumentsInPlace = options.supportsOpeningDocumentsInPlace;
|
|
16
|
+
}
|
|
17
|
+
if ('enableFileSharing' in options) {
|
|
18
|
+
config.modResults.UIFileSharingEnabled = options.enableFileSharing;
|
|
19
|
+
}
|
|
20
|
+
return config;
|
|
21
|
+
});
|
|
11
22
|
};
|
|
12
23
|
exports.default = (0, config_plugins_1.createRunOncePlugin)(withFileSystem, pkg.name, pkg.version);
|
|
@@ -1,13 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AndroidConfig,
|
|
3
|
+
ConfigPlugin,
|
|
4
|
+
createRunOncePlugin,
|
|
5
|
+
withInfoPlist,
|
|
6
|
+
} from 'expo/config-plugins';
|
|
2
7
|
|
|
3
8
|
const pkg = require('expo-file-system/package.json');
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
10
|
+
type FileSystemProps = {
|
|
11
|
+
supportsOpeningDocumentsInPlace?: boolean;
|
|
12
|
+
enableFileSharing?: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const withFileSystem: ConfigPlugin<FileSystemProps> = (config, options = {}) => {
|
|
16
|
+
// Apply Android permissions
|
|
17
|
+
config = AndroidConfig.Permissions.withPermissions(config, [
|
|
7
18
|
'android.permission.READ_EXTERNAL_STORAGE',
|
|
8
19
|
'android.permission.WRITE_EXTERNAL_STORAGE',
|
|
9
20
|
'android.permission.INTERNET',
|
|
10
21
|
]);
|
|
22
|
+
|
|
23
|
+
// Apply iOS modifications
|
|
24
|
+
return withInfoPlist(config, (config) => {
|
|
25
|
+
if ('supportsOpeningDocumentsInPlace' in options) {
|
|
26
|
+
config.modResults.LSSupportsOpeningDocumentsInPlace = options.supportsOpeningDocumentsInPlace;
|
|
27
|
+
}
|
|
28
|
+
if ('enableFileSharing' in options) {
|
|
29
|
+
config.modResults.UIFileSharingEnabled = options.enableFileSharing;
|
|
30
|
+
}
|
|
31
|
+
return config;
|
|
32
|
+
});
|
|
11
33
|
};
|
|
12
34
|
|
|
13
35
|
export default createRunOncePlugin(withFileSystem, pkg.name, pkg.version);
|
|
@@ -231,7 +231,7 @@ export declare class File {
|
|
|
231
231
|
* Writes content to the file.
|
|
232
232
|
* @param content The content to write into the file.
|
|
233
233
|
*/
|
|
234
|
-
write(content: string | Uint8Array, options
|
|
234
|
+
write(content: string | Uint8Array, options?: FileWriteOptions): void;
|
|
235
235
|
|
|
236
236
|
/**
|
|
237
237
|
* Deletes a file.
|
|
@@ -343,6 +343,11 @@ export declare class File {
|
|
|
343
343
|
* A mime type of the file. An empty string if the file does not exist, or it cannot be read.
|
|
344
344
|
*/
|
|
345
345
|
type: string;
|
|
346
|
+
/**
|
|
347
|
+
* A content URI to the file that can be shared to external applications.
|
|
348
|
+
* @platform android
|
|
349
|
+
*/
|
|
350
|
+
contentUri: string;
|
|
346
351
|
}
|
|
347
352
|
|
|
348
353
|
export declare class FileHandle {
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
eb9c254f5ab2514e83db9dd934eaa22c
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d372fc4ea514b436e89656c186c54f3c27320b7e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2ce5bf618d3e1370e92da41b3ae54847ee10874310bac1c7a31918ea9b463777
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
60c1582dab4e6504250846af398e2e5993b17a7c14c141282407f8f7f7949256331d238c5ea32afb7c5753903fc0b868fe1a79c3f972ea2525e947744005c6dc
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4149892f97989d0e3c81edb204b11142
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6c8de52d70ec473c90b7d31a92cf34950d748780
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ddc92ee79897052fc6df29460ca06ec69c13f347946bd4ecfbcd54358a65ff33
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c06237b0df153d84f847eec9d3b9a677605a639191980b6d38b58a42d98a8e56bd0cbed3e22cbc956ee27709abe0ff44f77750b961377b845510b093fef6a546
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
67281b958a56d1a6ac5cb5a750279cc2
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
81cca26371b64622c9660a1aea6ba86330857d45
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
79278f1252d479e6b3a4e84e2750c328ca0b93ca00e9c046b51eb0f67bad214e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2b92a2b6253b9792d3dd56266e68e175db78668e71d9ff48074d014d85523c51d45283ab6f3fefcaeae00239a102de61346a5fde6e1db69463dfe0e939ce5b5b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
adc47e4e9dcd8000dcb4118585091f93
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e83152fc2e06ca4e73308c35ee1b622c67c2b246
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f13835293053f940299c6b41adac4d852171a125501ab943d1e2d6ae022702b6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
184f7cb289671255cfd98d73b6777aa5186c06e96da3cbf9c6ff2e9c82daf7d4f3ee88fc75b311a7368ae9e327c9488fb855a96353d885d2590e6d76b58f8bca
|