expo-file-system 19.0.2 → 19.0.3
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 +7 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/filesystem/FilePickerContract.kt +71 -0
- package/android/src/main/java/expo/modules/filesystem/FileSystemExceptions.kt +2 -4
- package/android/src/main/java/expo/modules/filesystem/FileSystemModule.kt +25 -0
- package/android/src/main/java/expo/modules/filesystem/unifiedfile/SAFDocumentFile.kt +25 -14
- package/build/ExpoFileSystem.d.ts +2 -0
- package/build/ExpoFileSystem.d.ts.map +1 -1
- package/build/ExpoFileSystem.types.d.ts +16 -1
- package/build/ExpoFileSystem.types.d.ts.map +1 -1
- package/build/FileSystem.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.2/expo.modules.filesystem-19.0.2-sources.jar → 19.0.3/expo.modules.filesystem-19.0.3-sources.jar} +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3-sources.jar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3-sources.jar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3-sources.jar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3-sources.jar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.aar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.aar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.aar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.aar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.2/expo.modules.filesystem-19.0.2.module → 19.0.3/expo.modules.filesystem-19.0.3.module} +22 -22
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.2/expo.modules.filesystem-19.0.2.pom → 19.0.3/expo.modules.filesystem-19.0.3.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.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 +2 -2
- package/src/ExpoFileSystem.ts +2 -0
- package/src/ExpoFileSystem.types.ts +18 -1
- package/src/FileSystem.ts +10 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2-sources.jar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2-sources.jar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2-sources.jar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2-sources.jar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.aar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.aar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.aar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.aar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.2/expo.modules.filesystem-19.0.2.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 19.0.3 — 2025-08-18
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fixed type definition for `textSync()` to return `string` instead of `Promise<string>` ([#38898](https://github.com/expo/expo/pull/38898) by [@LeonDvlpmnt](https://github.com/LeonDvlpmnt))
|
|
18
|
+
|
|
13
19
|
## 19.0.2 — 2025-08-16
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
|
@@ -28,6 +34,7 @@ _This version does not introduce any user-facing changes._
|
|
|
28
34
|
|
|
29
35
|
### 🎉 New features
|
|
30
36
|
|
|
37
|
+
- [android] Add file and directory pickers. ([#38455](https://github.com/expo/expo/pull/38455) by [@aleqsio](https://github.com/aleqsio))
|
|
31
38
|
- Add support for asset uris. ([#38785](https://github.com/expo/expo/pull/38785) by [@aleqsio](https://github.com/aleqsio))
|
|
32
39
|
- Make file implement blob interface directly. ([#38160](https://github.com/expo/expo/pull/38160) by [@aleqsio](https://github.com/aleqsio))
|
|
33
40
|
- Add directory info function ([#37910](https://github.com/expo/expo/pull/37910) by [@Wenszel](https://github.com/Wenszel))
|
package/android/build.gradle
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
package expo.modules.filesystem
|
|
2
|
+
|
|
3
|
+
import android.annotation.SuppressLint
|
|
4
|
+
import android.app.Activity
|
|
5
|
+
import android.content.ContentResolver
|
|
6
|
+
import android.content.Context
|
|
7
|
+
import android.content.Intent
|
|
8
|
+
import android.net.Uri
|
|
9
|
+
import android.os.Build
|
|
10
|
+
import android.provider.DocumentsContract
|
|
11
|
+
import expo.modules.kotlin.activityresult.AppContextActivityResultContract
|
|
12
|
+
import expo.modules.kotlin.providers.AppContextProvider
|
|
13
|
+
import java.io.Serializable
|
|
14
|
+
|
|
15
|
+
@SuppressLint("WrongConstant")
|
|
16
|
+
internal class FilePickerContract(private val appContextProvider: AppContextProvider) : AppContextActivityResultContract<FilePickerContractOptions, FilePickerContractResult> {
|
|
17
|
+
private val contentResolver: ContentResolver
|
|
18
|
+
get() = requireNotNull(appContextProvider.appContext.reactContext) {
|
|
19
|
+
"React Application Context is null"
|
|
20
|
+
}.contentResolver
|
|
21
|
+
|
|
22
|
+
override fun createIntent(context: Context, input: FilePickerContractOptions): Intent =
|
|
23
|
+
if (input.pickerType == PickerType.FILE) {
|
|
24
|
+
Intent(Intent.ACTION_OPEN_DOCUMENT).apply {
|
|
25
|
+
// if no type is set no intent handler is found – just android things
|
|
26
|
+
type = input.mimeType ?: "*/*"
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
|
|
30
|
+
}.also { intent ->
|
|
31
|
+
// intent.addCategory(Intent.CATEGORY_OPENABLE)
|
|
32
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
33
|
+
input.initialUri.let { intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, it) }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
override fun parseResult(input: FilePickerContractOptions, resultCode: Int, intent: Intent?): FilePickerContractResult =
|
|
38
|
+
if (resultCode == Activity.RESULT_CANCELED || intent == null) {
|
|
39
|
+
FilePickerContractResult.Cancelled
|
|
40
|
+
} else {
|
|
41
|
+
val uri = intent.data
|
|
42
|
+
val takeFlags = (intent.flags.and((Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION)))
|
|
43
|
+
uri?.let {
|
|
44
|
+
contentResolver.takePersistableUriPermission(it, takeFlags)
|
|
45
|
+
}
|
|
46
|
+
when (input.pickerType) {
|
|
47
|
+
PickerType.DIRECTORY -> FilePickerContractResult.Success(
|
|
48
|
+
FileSystemDirectory(
|
|
49
|
+
uri
|
|
50
|
+
?: Uri.EMPTY
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
PickerType.FILE -> {
|
|
55
|
+
FilePickerContractResult.Success(FileSystemFile(uri ?: Uri.EMPTY))
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
internal data class FilePickerContractOptions(val initialUri: Uri?, val mimeType: String? = null, val pickerType: PickerType = PickerType.FILE) : Serializable
|
|
62
|
+
|
|
63
|
+
internal enum class PickerType {
|
|
64
|
+
FILE,
|
|
65
|
+
DIRECTORY
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
internal sealed class FilePickerContractResult {
|
|
69
|
+
class Success(val path: FileSystemPath) : FilePickerContractResult()
|
|
70
|
+
object Cancelled : FilePickerContractResult()
|
|
71
|
+
}
|
|
@@ -44,10 +44,8 @@ internal class UnableToWriteHandleException(reason: String) :
|
|
|
44
44
|
"Unable to write to a file handle: '$reason'"
|
|
45
45
|
)
|
|
46
46
|
|
|
47
|
-
internal class
|
|
48
|
-
CodedException(
|
|
49
|
-
"Unable to get info from a file: '$reason'"
|
|
50
|
-
)
|
|
47
|
+
internal class PickerCancelledException :
|
|
48
|
+
CodedException("The file picker was cancelled by the user")
|
|
51
49
|
|
|
52
50
|
internal class DestinationAlreadyExistsException :
|
|
53
51
|
CodedException(
|
|
@@ -4,6 +4,7 @@ import android.content.Context
|
|
|
4
4
|
import android.net.Uri
|
|
5
5
|
import android.webkit.URLUtil
|
|
6
6
|
import expo.modules.interfaces.filesystem.Permission
|
|
7
|
+
import expo.modules.kotlin.activityresult.AppContextActivityResultLauncher
|
|
7
8
|
import expo.modules.kotlin.apifeatures.EitherType
|
|
8
9
|
import expo.modules.kotlin.devtools.await
|
|
9
10
|
import expo.modules.kotlin.exception.Exceptions
|
|
@@ -80,6 +81,30 @@ class FileSystemModule : Module() {
|
|
|
80
81
|
return@Coroutine destination.toURI()
|
|
81
82
|
}
|
|
82
83
|
|
|
84
|
+
lateinit var filePickerLauncher: AppContextActivityResultLauncher<FilePickerContractOptions, FilePickerContractResult>
|
|
85
|
+
|
|
86
|
+
RegisterActivityContracts {
|
|
87
|
+
filePickerLauncher = registerForActivityResult(
|
|
88
|
+
FilePickerContract(this@FileSystemModule)
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
AsyncFunction("pickDirectoryAsync") Coroutine { initialUri: Uri? ->
|
|
93
|
+
val result = filePickerLauncher.launch(FilePickerContractOptions(initialUri, null, PickerType.DIRECTORY))
|
|
94
|
+
when (result) {
|
|
95
|
+
is FilePickerContractResult.Success -> result.path as FileSystemDirectory
|
|
96
|
+
is FilePickerContractResult.Cancelled -> throw PickerCancelledException()
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
AsyncFunction("pickFileAsync") Coroutine { initialUri: Uri?, mimeType: String? ->
|
|
101
|
+
val result = filePickerLauncher.launch(FilePickerContractOptions(initialUri, mimeType, PickerType.FILE))
|
|
102
|
+
when (result) {
|
|
103
|
+
is FilePickerContractResult.Success -> result.path as FileSystemFile
|
|
104
|
+
is FilePickerContractResult.Cancelled -> throw PickerCancelledException()
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
83
108
|
Function("info") { url: URI ->
|
|
84
109
|
val file = File(url)
|
|
85
110
|
val permissions = appContext.filePermission?.getPathPermissions(appContext.reactContext, file.path)
|
|
@@ -7,45 +7,56 @@ import java.io.InputStream
|
|
|
7
7
|
import java.io.OutputStream
|
|
8
8
|
|
|
9
9
|
class SAFDocumentFile(private val context: Context, override val uri: Uri) : UnifiedFileInterface {
|
|
10
|
-
private val
|
|
10
|
+
private val documentFile: DocumentFile?
|
|
11
|
+
get() {
|
|
12
|
+
// Relying on singleUri.isDirectory did not work, and there's no explicit method for this, so we check path
|
|
13
|
+
val pathSegment = uri.pathSegments.getOrNull(0) ?: "tree"
|
|
14
|
+
if (pathSegment == "document") {
|
|
15
|
+
// If the path starts with "document", we treat it as a raw file URI
|
|
16
|
+
return DocumentFile.fromSingleUri(context, uri)
|
|
17
|
+
} else {
|
|
18
|
+
// Otherwise, we treat it as a tree URI
|
|
19
|
+
return DocumentFile.fromTreeUri(context, uri)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
11
22
|
|
|
12
|
-
override fun exists(): Boolean =
|
|
23
|
+
override fun exists(): Boolean = documentFile?.exists() == true
|
|
13
24
|
|
|
14
25
|
override fun isDirectory(): Boolean {
|
|
15
|
-
return
|
|
26
|
+
return documentFile?.isDirectory == true
|
|
16
27
|
}
|
|
17
28
|
|
|
18
29
|
override fun isFile(): Boolean {
|
|
19
|
-
return
|
|
30
|
+
return documentFile?.isFile == true
|
|
20
31
|
}
|
|
21
32
|
|
|
22
33
|
override val parentFile: UnifiedFileInterface?
|
|
23
|
-
get() =
|
|
34
|
+
get() = documentFile?.parentFile?.uri?.let { SAFDocumentFile(context, it) }
|
|
24
35
|
|
|
25
36
|
override fun createFile(mimeType: String, displayName: String): UnifiedFileInterface? {
|
|
26
|
-
val documentFile =
|
|
37
|
+
val documentFile = documentFile?.createFile(mimeType, displayName)
|
|
27
38
|
return documentFile?.uri?.let { SAFDocumentFile(context, it) }
|
|
28
39
|
}
|
|
29
40
|
|
|
30
41
|
override fun createDirectory(displayName: String): UnifiedFileInterface? {
|
|
31
|
-
val documentFile =
|
|
42
|
+
val documentFile = documentFile?.createDirectory(displayName)
|
|
32
43
|
return documentFile?.uri?.let { SAFDocumentFile(context, it) }
|
|
33
44
|
}
|
|
34
45
|
|
|
35
|
-
override fun delete(): Boolean =
|
|
46
|
+
override fun delete(): Boolean = documentFile?.delete() == true
|
|
36
47
|
|
|
37
48
|
override fun listFilesAsUnified(): List<UnifiedFileInterface> =
|
|
38
|
-
|
|
49
|
+
documentFile?.listFiles()?.map { SAFDocumentFile(context, it.uri) } ?: emptyList()
|
|
39
50
|
|
|
40
51
|
override val type: String?
|
|
41
|
-
get() =
|
|
52
|
+
get() = documentFile?.type
|
|
42
53
|
|
|
43
54
|
override fun lastModified(): Long? {
|
|
44
|
-
return
|
|
55
|
+
return documentFile?.lastModified()
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
override val fileName: String?
|
|
48
|
-
get() =
|
|
59
|
+
get() = documentFile?.name
|
|
49
60
|
|
|
50
61
|
override val creationTime: Long? get() {
|
|
51
62
|
// It seems there's no way to get this
|
|
@@ -63,14 +74,14 @@ class SAFDocumentFile(private val context: Context, override val uri: Uri) : Uni
|
|
|
63
74
|
}
|
|
64
75
|
|
|
65
76
|
override fun length(): Long {
|
|
66
|
-
return
|
|
77
|
+
return documentFile?.length() ?: 0
|
|
67
78
|
}
|
|
68
79
|
|
|
69
80
|
override fun walkTopDown(): Sequence<SAFDocumentFile> {
|
|
70
81
|
return sequence {
|
|
71
82
|
yield(this@SAFDocumentFile)
|
|
72
83
|
if (isDirectory()) {
|
|
73
|
-
|
|
84
|
+
documentFile?.listFiles()?.forEach { child ->
|
|
74
85
|
yieldAll(SAFDocumentFile(context, child.uri).walkTopDown())
|
|
75
86
|
}
|
|
76
87
|
}
|
|
@@ -4,6 +4,8 @@ declare class ExpoFileSystemModule extends NativeModule {
|
|
|
4
4
|
FileSystemDirectory: typeof Directory;
|
|
5
5
|
FileSystemFile: typeof File;
|
|
6
6
|
downloadFileAsync(url: string, destination: File | Directory, options?: DownloadOptions): Promise<string>;
|
|
7
|
+
pickDirectoryAsync(initialUri?: string): Promise<Directory>;
|
|
8
|
+
pickFileAsync(initialUri?: string, mimeType?: string): Promise<File>;
|
|
7
9
|
totalDiskSpace: number;
|
|
8
10
|
availableDiskSpace: number;
|
|
9
11
|
documentDirectory: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoFileSystem.d.ts","sourceRoot":"","sources":["../src/ExpoFileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE/E,OAAO,OAAO,oBAAqB,SAAQ,YAAY;IACrD,mBAAmB,EAAE,OAAO,SAAS,CAAC;IACtC,cAAc,EAAE,OAAO,IAAI,CAAC;IAC5B,iBAAiB,CACf,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,IAAI,GAAG,SAAS,EAC7B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB;;AAED,wBAAuE"}
|
|
1
|
+
{"version":3,"file":"ExpoFileSystem.d.ts","sourceRoot":"","sources":["../src/ExpoFileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE/E,OAAO,OAAO,oBAAqB,SAAQ,YAAY;IACrD,mBAAmB,EAAE,OAAO,SAAS,CAAC;IACtC,cAAc,EAAE,OAAO,IAAI,CAAC;IAC5B,iBAAiB,CACf,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,IAAI,GAAG,SAAS,EAC7B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC;IAClB,kBAAkB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAC3D,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACpE,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB;;AAED,wBAAuE"}
|
|
@@ -78,6 +78,13 @@ export declare class Directory {
|
|
|
78
78
|
* A size of the directory in bytes. Null if the directory does not exist, or it cannot be read.
|
|
79
79
|
*/
|
|
80
80
|
size: number | null;
|
|
81
|
+
/**
|
|
82
|
+
* @platform android
|
|
83
|
+
* A static method that opens a file picker to select a directory.
|
|
84
|
+
* @param initialUri An optional uri pointing to an initial folder on which the directory picker is opened.
|
|
85
|
+
* @returns a `Directory` instance. The underlying uri will be a content uri on Android.
|
|
86
|
+
*/
|
|
87
|
+
static pickDirectoryAsync(initialUri?: string): Promise<Directory>;
|
|
81
88
|
}
|
|
82
89
|
export type DownloadOptions = {
|
|
83
90
|
/**
|
|
@@ -115,7 +122,7 @@ export declare class File {
|
|
|
115
122
|
* Retrieves text from the file.
|
|
116
123
|
* @returns The contents of the file as string.
|
|
117
124
|
*/
|
|
118
|
-
textSync():
|
|
125
|
+
textSync(): string;
|
|
119
126
|
/**
|
|
120
127
|
* Retrieves content of the file as base64.
|
|
121
128
|
* @returns A promise that resolves with the contents of the file as a base64 string.
|
|
@@ -188,6 +195,14 @@ export declare class File {
|
|
|
188
195
|
* ```
|
|
189
196
|
*/
|
|
190
197
|
static downloadFileAsync(url: string, destination: Directory | File, options?: DownloadOptions): Promise<File>;
|
|
198
|
+
/**
|
|
199
|
+
* @platform android
|
|
200
|
+
* A static method that opens a file picker to select a single file of specified type.
|
|
201
|
+
* @param initialUri An optional uri pointing to an initial folder on which the file picker is opened.
|
|
202
|
+
* @param mimeType A mime type that is used to filter out files that can be picked out.
|
|
203
|
+
* @returns a `File` instance.
|
|
204
|
+
*/
|
|
205
|
+
static pickFileAsync(initialUri?: string, mimeType?: string): Promise<File>;
|
|
191
206
|
/**
|
|
192
207
|
* A size of the file in bytes. 0 if the file does not exist, or it cannot be read.
|
|
193
208
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoFileSystem.types.d.ts","sourceRoot":"","sources":["../src/ExpoFileSystem.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B;;;;;;;OAOG;gBACS,GAAG,IAAI,EAAE,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE;IAElD;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,YAAY,IAAI,IAAI;IAEpB;;;;OAIG;IACH,MAAM,IAAI,IAAI;IAEd;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI;IAErC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAEvD,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;IAExC;;OAEG;IACH,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI;IAEzC;;OAEG;IACH,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI;IAEzC;;;;OAIG;IACH,aAAa,IAAI;QAAE,WAAW,EAAE,MAAM,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,IAAI,GAAG,SAAS,CAAC,EAAE;IAQlD,IAAI,eAAe,cAElB;IAED;;;OAGG;IACH,IAAI,SAAS,WAEZ;IAED;;OAEG;IACH,IAAI,IAAI,WAEP;IAED,cAAc;IAId,cAAc;IAIR,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;IAKzC,MAAM,IAAI,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAIjD,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;CAGhE;AAiBD;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,cAAc,CAAC,mBAAmB;IAC/D;;;;;;;OAOG;gBACS,GAAG,IAAI,EAAE,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE;IAQlD,IAAI,eAAe,cAElB;IAED;;;;OAIG;IACM,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE;IAOrC;;OAEG;IACH,IAAI,IAAI,WAEP;IAED,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAKvD,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;CAGzC"}
|
package/expo-module.config.json
CHANGED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8e4953080a31fa4851c0d3af21f5f2a8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5f879a11258f3b3e06b575f71e801aab8e25113b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9cf826cfa827700e415e780bc1b4a49477ea31486d465154824b7331c89e9dc7
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c91977ae610fa808ea0765cd14182ad1d8961f59cbdf2df2396e7f77fe8cadbcd152018902a4f09474177b5ea77f78c107d6016c127d0546c4e9b0ebbf2b13fe
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
67fb8fe6d438a03c9f9b1419f17a116d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7f26aacfe041259700988a8f2e865b6d78a47865
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
977ef17ccaa7a6f8c09c70d2f2f2f0c1002f07df8b3756ce3905a37a7288b41b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
36dc7ab692103570111d72588e7674ae1c7cf2c0665a351738f87dc0af98dbccb34aef221f34b5630403f2d6fd46a13cd22e4b3fb75a90f6b8b0bc2a41dd49cf
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.filesystem",
|
|
6
|
-
"version": "19.0.
|
|
6
|
+
"version": "19.0.3",
|
|
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.
|
|
79
|
-
"url": "expo.modules.filesystem-19.0.
|
|
80
|
-
"size":
|
|
81
|
-
"sha512": "
|
|
82
|
-
"sha256": "
|
|
83
|
-
"sha1": "
|
|
84
|
-
"md5": "
|
|
78
|
+
"name": "expo.modules.filesystem-19.0.3.aar",
|
|
79
|
+
"url": "expo.modules.filesystem-19.0.3.aar",
|
|
80
|
+
"size": 373316,
|
|
81
|
+
"sha512": "36dc7ab692103570111d72588e7674ae1c7cf2c0665a351738f87dc0af98dbccb34aef221f34b5630403f2d6fd46a13cd22e4b3fb75a90f6b8b0bc2a41dd49cf",
|
|
82
|
+
"sha256": "977ef17ccaa7a6f8c09c70d2f2f2f0c1002f07df8b3756ce3905a37a7288b41b",
|
|
83
|
+
"sha1": "7f26aacfe041259700988a8f2e865b6d78a47865",
|
|
84
|
+
"md5": "67fb8fe6d438a03c9f9b1419f17a116d"
|
|
85
85
|
}
|
|
86
86
|
]
|
|
87
87
|
},
|
|
@@ -153,13 +153,13 @@
|
|
|
153
153
|
],
|
|
154
154
|
"files": [
|
|
155
155
|
{
|
|
156
|
-
"name": "expo.modules.filesystem-19.0.
|
|
157
|
-
"url": "expo.modules.filesystem-19.0.
|
|
158
|
-
"size":
|
|
159
|
-
"sha512": "
|
|
160
|
-
"sha256": "
|
|
161
|
-
"sha1": "
|
|
162
|
-
"md5": "
|
|
156
|
+
"name": "expo.modules.filesystem-19.0.3.aar",
|
|
157
|
+
"url": "expo.modules.filesystem-19.0.3.aar",
|
|
158
|
+
"size": 373316,
|
|
159
|
+
"sha512": "36dc7ab692103570111d72588e7674ae1c7cf2c0665a351738f87dc0af98dbccb34aef221f34b5630403f2d6fd46a13cd22e4b3fb75a90f6b8b0bc2a41dd49cf",
|
|
160
|
+
"sha256": "977ef17ccaa7a6f8c09c70d2f2f2f0c1002f07df8b3756ce3905a37a7288b41b",
|
|
161
|
+
"sha1": "7f26aacfe041259700988a8f2e865b6d78a47865",
|
|
162
|
+
"md5": "67fb8fe6d438a03c9f9b1419f17a116d"
|
|
163
163
|
}
|
|
164
164
|
]
|
|
165
165
|
},
|
|
@@ -173,13 +173,13 @@
|
|
|
173
173
|
},
|
|
174
174
|
"files": [
|
|
175
175
|
{
|
|
176
|
-
"name": "expo.modules.filesystem-19.0.
|
|
177
|
-
"url": "expo.modules.filesystem-19.0.
|
|
178
|
-
"size":
|
|
179
|
-
"sha512": "
|
|
180
|
-
"sha256": "
|
|
181
|
-
"sha1": "
|
|
182
|
-
"md5": "
|
|
176
|
+
"name": "expo.modules.filesystem-19.0.3-sources.jar",
|
|
177
|
+
"url": "expo.modules.filesystem-19.0.3-sources.jar",
|
|
178
|
+
"size": 28421,
|
|
179
|
+
"sha512": "c91977ae610fa808ea0765cd14182ad1d8961f59cbdf2df2396e7f77fe8cadbcd152018902a4f09474177b5ea77f78c107d6016c127d0546c4e9b0ebbf2b13fe",
|
|
180
|
+
"sha256": "9cf826cfa827700e415e780bc1b4a49477ea31486d465154824b7331c89e9dc7",
|
|
181
|
+
"sha1": "5f879a11258f3b3e06b575f71e801aab8e25113b",
|
|
182
|
+
"md5": "8e4953080a31fa4851c0d3af21f5f2a8"
|
|
183
183
|
}
|
|
184
184
|
]
|
|
185
185
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
115b0114af05e17995f5bdab07a3ab16
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
733bfd800ab7ebc1d1c82e642b4edead8a901d5f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
150872c129c64983be7ab2056d944f25320d581de315845c19d76eaa1c0980f7
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
855720b3802de8a9b796433f6d8e05d5c3b456737b0f6f4f629015a5cd04667216e93f6ab85ddd074864405ef689ee5ea446463c9bef1f54d8525123e852d1e0
|
|
@@ -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.
|
|
12
|
+
<version>19.0.3</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
|
+
bd9d6af2053adec1ffb3073e8d903b4b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6d75988f414535c89f497db1cc5582b4c1944204
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
236607b1436c81d824e4ef0676fbabc20af5c3c4fa7fc377ae96635a450a10e8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
93c9c7905bf9a196739eefc98d7f0722ec9a2be6f237e7ac7413279b3b6e9684cc3e62d386d4490c95e1d752b37be2e911e23974f41d661564ee44226320557f
|
|
@@ -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.
|
|
7
|
-
<release>19.0.
|
|
6
|
+
<latest>19.0.3</latest>
|
|
7
|
+
<release>19.0.3</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>19.0.
|
|
9
|
+
<version>19.0.3</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250818203955</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
bf814914808c5cde6a874f5314c5c03c
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
a6a0d0e61b39cdf7af63bdade461ea017c77ee7f
|
package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7d7c0cb2bef2183a4840f8b5af5032596df0279a3db9935719845c5b38d16fe6
|
package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha512
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
94088dcb40367cbe08c959ce13e74789a467191884f402298b4ee4982db73bbb8138fc7bfeb9af43d37f74a8f608b357353b20a8b020a4d76064318458554c67
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-file-system",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.3",
|
|
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",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"expo": "*",
|
|
43
43
|
"react-native": "*"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "475cdabd3faad56f0e8c4abcaaf21140c01c094f"
|
|
46
46
|
}
|
package/src/ExpoFileSystem.ts
CHANGED
|
@@ -10,6 +10,8 @@ declare class ExpoFileSystemModule extends NativeModule {
|
|
|
10
10
|
destination: File | Directory,
|
|
11
11
|
options?: DownloadOptions
|
|
12
12
|
): Promise<string>;
|
|
13
|
+
pickDirectoryAsync(initialUri?: string): Promise<Directory>;
|
|
14
|
+
pickFileAsync(initialUri?: string, mimeType?: string): Promise<File>;
|
|
13
15
|
totalDiskSpace: number;
|
|
14
16
|
availableDiskSpace: number;
|
|
15
17
|
documentDirectory: string;
|
|
@@ -89,6 +89,14 @@ export declare class Directory {
|
|
|
89
89
|
* A size of the directory in bytes. Null if the directory does not exist, or it cannot be read.
|
|
90
90
|
*/
|
|
91
91
|
size: number | null;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @platform android
|
|
95
|
+
* A static method that opens a file picker to select a directory.
|
|
96
|
+
* @param initialUri An optional uri pointing to an initial folder on which the directory picker is opened.
|
|
97
|
+
* @returns a `Directory` instance. The underlying uri will be a content uri on Android.
|
|
98
|
+
*/
|
|
99
|
+
static pickDirectoryAsync(initialUri?: string): Promise<Directory>;
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
export type DownloadOptions = {
|
|
@@ -132,7 +140,7 @@ export declare class File {
|
|
|
132
140
|
* Retrieves text from the file.
|
|
133
141
|
* @returns The contents of the file as string.
|
|
134
142
|
*/
|
|
135
|
-
textSync():
|
|
143
|
+
textSync(): string;
|
|
136
144
|
|
|
137
145
|
/**
|
|
138
146
|
* Retrieves content of the file as base64.
|
|
@@ -223,6 +231,15 @@ export declare class File {
|
|
|
223
231
|
options?: DownloadOptions
|
|
224
232
|
): Promise<File>;
|
|
225
233
|
|
|
234
|
+
/**
|
|
235
|
+
* @platform android
|
|
236
|
+
* A static method that opens a file picker to select a single file of specified type.
|
|
237
|
+
* @param initialUri An optional uri pointing to an initial folder on which the file picker is opened.
|
|
238
|
+
* @param mimeType A mime type that is used to filter out files that can be picked out.
|
|
239
|
+
* @returns a `File` instance.
|
|
240
|
+
*/
|
|
241
|
+
static pickFileAsync(initialUri?: string, mimeType?: string): Promise<File>;
|
|
242
|
+
|
|
226
243
|
/**
|
|
227
244
|
* A size of the file in bytes. 0 if the file does not exist, or it cannot be read.
|
|
228
245
|
*/
|
package/src/FileSystem.ts
CHANGED
|
@@ -125,6 +125,11 @@ File.downloadFileAsync = async function downloadFileAsync(
|
|
|
125
125
|
return new File(outputURI);
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
+
File.pickFileAsync = async function (initialUri?: string, mimeType?: string) {
|
|
129
|
+
const file = (await ExpoFileSystem.pickFileAsync(initialUri, mimeType)).uri;
|
|
130
|
+
return new File(file);
|
|
131
|
+
};
|
|
132
|
+
|
|
128
133
|
/**
|
|
129
134
|
* Represents a directory on the filesystem.
|
|
130
135
|
*
|
|
@@ -179,3 +184,8 @@ export class Directory extends ExpoFileSystem.FileSystemDirectory {
|
|
|
179
184
|
return new Directory(super.createDirectory(name).uri);
|
|
180
185
|
}
|
|
181
186
|
}
|
|
187
|
+
|
|
188
|
+
Directory.pickDirectoryAsync = async function (initialUri?: string) {
|
|
189
|
+
const directory = (await ExpoFileSystem.pickDirectoryAsync(initialUri)).uri;
|
|
190
|
+
return new Directory(directory);
|
|
191
|
+
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
99439b02aef17bd440c0abcaf089b748
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0042fe2aed8a969c26f2d2bb72a92b6ccd84f167
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8097cd642d39939ebf8ec65d03aa1845ada4f549eca7e452afab9402799515c9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ea65beba4d54d38bff01098d340a18c32c0d2ef808462b4557b54938b8407b79c775fe2e915434a99196389b407b755b8149e9b87ff6f3d0babd687f8754e53c
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8cdbf9c8f6d8d1e55b0bda1e0f4a382e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
aa67c1e859974640d0fc6e9badd60aa2d12c5ed0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
464908df1a8f9435fa74a6f4313f4c2180019dc04d6e466566f3486388864020
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1a4366a3ef568e2a424c56459c7392817676d7558855346ba5a637e408ff3077960d9bd06ce042a1567eb051f52ee62282b4b0312b090066deda759f9f5a7f51
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3ba93fc0c823fc9ae6d435a998d70fe6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
17bb9d6724d88f155cdbf013d6f154aa65216b01
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
468df42d436ec31621400a7206d5be3966b23f93a06af293d0ba98a96e0f52bc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
944b83f7052e68ef56f7219b2ce9ff668af44983fff1fb6ee573a54f7a9cad4ffde2661d36f81b80be90ce628e2ca10c611894d081c0c4acd9351208320d8cc4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f59f7aca9d16a40b70e3993adfad1cb8
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f7415146c6a1e138d5d5d095bf5027da418da560
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1cab7e2943ced4469577ea0490b10785390859ddf2dd4e0c50f42d79db2a7b61
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2f59205a0923a4e9dd3394ed36e1d1d55ec85c97ff1ce3c8ff2de66cf14e7dae038a675f5e54ad5ebc64e832d4d7e8a0b6a111d75e67d06092cdf375a6ccadd7
|