expo-file-system 19.0.10 → 19.0.12
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 +14 -0
- package/android/build.gradle +2 -2
- package/build/ExpoFileSystem.types.d.ts +4 -2
- package/build/ExpoFileSystem.types.d.ts.map +1 -1
- package/build/ExpoFileSystem.web.d.ts +20 -0
- package/build/ExpoFileSystem.web.d.ts.map +1 -0
- package/expo-module.config.json +1 -1
- package/ios/FilePickingHandler.swift +7 -0
- package/ios/FilePickingUtils.swift +34 -1
- package/ios/FileSystemDirectory.swift +40 -38
- package/ios/FileSystemExceptions.swift +6 -0
- package/ios/FileSystemFile.swift +52 -50
- package/ios/FileSystemModule.swift +14 -0
- package/ios/FileSystemPath.swift +17 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.aar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.aar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.aar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.aar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.10/expo.modules.filesystem-19.0.10.module → 19.0.12/expo.modules.filesystem-19.0.12.module} +17 -17
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.10/expo.modules.filesystem-19.0.10.pom → 19.0.12/expo.modules.filesystem-19.0.12.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.12/expo.modules.filesystem-19.0.12.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/src/ExpoFileSystem.types.ts +4 -2
- package/src/ExpoFileSystem.web.ts +48 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.aar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.aar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.aar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.aar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.10/expo.modules.filesystem-19.0.10.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.10/expo.modules.filesystem-19.0.10-sources.jar → 19.0.12/expo.modules.filesystem-19.0.12-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.10/expo.modules.filesystem-19.0.10-sources.jar.md5 → 19.0.12/expo.modules.filesystem-19.0.12-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.10/expo.modules.filesystem-19.0.10-sources.jar.sha1 → 19.0.12/expo.modules.filesystem-19.0.12-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.10/expo.modules.filesystem-19.0.10-sources.jar.sha256 → 19.0.12/expo.modules.filesystem-19.0.12-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.10/expo.modules.filesystem-19.0.10-sources.jar.sha512 → 19.0.12/expo.modules.filesystem-19.0.12-sources.jar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,20 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 19.0.12 — 2025-09-11
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 19.0.11 — 2025-09-10
|
|
18
|
+
|
|
19
|
+
### 🎉 New features
|
|
20
|
+
|
|
21
|
+
- [iOS] Add `pickDirectoryAsync` support ([#39210](https://github.com/expo/expo/pull/39210) by [@kosmydel](https://github.com/kosmydel))
|
|
22
|
+
|
|
23
|
+
### 🐛 Bug fixes
|
|
24
|
+
|
|
25
|
+
- Add minimal web stub to fix broken imports on web ([#39400](https://github.com/expo/expo/pull/39400) by [@LeonDvlpmnt](https://github.com/LeonDvlpmnt))
|
|
26
|
+
|
|
13
27
|
## 19.0.10 — 2025-09-08
|
|
14
28
|
|
|
15
29
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -108,9 +108,11 @@ export declare class Directory {
|
|
|
108
108
|
size: number | null;
|
|
109
109
|
/**
|
|
110
110
|
* A static method that opens a file picker to select a directory.
|
|
111
|
+
*
|
|
112
|
+
* On iOS, the selected directory grants temporary read and write access for the current app session only. After the app restarts, you must prompt the user again to regain access.
|
|
113
|
+
*
|
|
111
114
|
* @param initialUri An optional uri pointing to an initial folder on which the directory picker is opened.
|
|
112
|
-
* @returns a `Directory` instance.
|
|
113
|
-
* @platform android
|
|
115
|
+
* @returns a `Directory` instance. On Android, the underlying uri will be a content URI.
|
|
114
116
|
*/
|
|
115
117
|
static pickDirectoryAsync(initialUri?: string): Promise<Directory>;
|
|
116
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoFileSystem.types.d.ts","sourceRoot":"","sources":["../src/ExpoFileSystem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AAI,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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare class FileSystemFile {
|
|
2
|
+
constructor();
|
|
3
|
+
}
|
|
4
|
+
declare class FileSystemDirectory {
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
declare const _default: {
|
|
8
|
+
FileSystemDirectory: typeof FileSystemDirectory;
|
|
9
|
+
FileSystemFile: typeof FileSystemFile;
|
|
10
|
+
downloadFileAsync: () => Promise<void>;
|
|
11
|
+
pickDirectoryAsync: () => Promise<void>;
|
|
12
|
+
pickFileAsync: () => Promise<void>;
|
|
13
|
+
readonly totalDiskSpace: number;
|
|
14
|
+
readonly availableDiskSpace: number;
|
|
15
|
+
readonly documentDirectory: string;
|
|
16
|
+
readonly cacheDirectory: string;
|
|
17
|
+
readonly bundleDirectory: string;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
//# sourceMappingURL=ExpoFileSystem.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoFileSystem.web.d.ts","sourceRoot":"","sources":["../src/ExpoFileSystem.web.ts"],"names":[],"mappings":"AAAA,cAAM,cAAc;;CAInB;AAED,cAAM,mBAAmB;;CAIxB;;;;;;;6BAiBuB,MAAM;iCAIF,MAAM;gCAIP,MAAM;6BAIT,MAAM;8BAIL,MAAM;;AA/B/B,wBAmCE"}
|
package/expo-module.config.json
CHANGED
|
@@ -70,6 +70,13 @@ internal class FilePickingHandler: FilePickingResultHandler {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
func didPickDirectoryAt(url: URL) {
|
|
74
|
+
handlePickingResult { context in
|
|
75
|
+
let directory = FileSystemDirectory(url: url)
|
|
76
|
+
context.promise.resolve(directory)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
73
80
|
func didCancelPicking() {
|
|
74
81
|
handlePickingResult { context in
|
|
75
82
|
context.promise.reject(FilePickingCancelledException())
|
|
@@ -7,6 +7,7 @@ import UniformTypeIdentifiers
|
|
|
7
7
|
|
|
8
8
|
internal protocol FilePickingResultHandler {
|
|
9
9
|
func didPickFileAt(url: URL)
|
|
10
|
+
func didPickDirectoryAt(url: URL)
|
|
10
11
|
func didCancelPicking()
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -36,7 +37,22 @@ internal class FilePickingDelegate: NSObject, UIDocumentPickerDelegate, UIAdapti
|
|
|
36
37
|
return
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
if isDirectory {
|
|
41
|
+
// For directory access, we need to start accessing the security-scoped resource
|
|
42
|
+
let didStartAccessing = url.startAccessingSecurityScopedResource()
|
|
43
|
+
if didStartAccessing {
|
|
44
|
+
// Store the picked URL for proper cleanup
|
|
45
|
+
if let pickingHandler = pickingHandler {
|
|
46
|
+
pickingHandler.filePickingContext?.pickedUrl = url
|
|
47
|
+
}
|
|
48
|
+
self.resultHandler.didPickDirectoryAt(url: url)
|
|
49
|
+
} else {
|
|
50
|
+
// If we can't access the directory, treat as cancellation
|
|
51
|
+
self.resultHandler.didCancelPicking()
|
|
52
|
+
}
|
|
53
|
+
} else {
|
|
54
|
+
self.resultHandler.didPickFileAt(url: url)
|
|
55
|
+
}
|
|
40
56
|
}
|
|
41
57
|
|
|
42
58
|
func documentPickerWasCancelled(_ controller: UIDocumentPickerViewController) {
|
|
@@ -86,6 +102,23 @@ internal func createFilePicker(initialUri: URL?, mimeType: String?) -> UIDocumen
|
|
|
86
102
|
return picker
|
|
87
103
|
}
|
|
88
104
|
|
|
105
|
+
internal func createDirectoryPicker(initialUri: URL?) -> UIDocumentPickerViewController {
|
|
106
|
+
if #available(iOS 14.0, *) {
|
|
107
|
+
// Use UTType.folder for directory access as per Apple's documentation
|
|
108
|
+
let picker = UIDocumentPickerViewController(forOpeningContentTypes: [UTType.folder], asCopy: false)
|
|
109
|
+
if let initialUri = initialUri {
|
|
110
|
+
picker.directoryURL = initialUri
|
|
111
|
+
}
|
|
112
|
+
return picker
|
|
113
|
+
}
|
|
114
|
+
// For iOS 13 and earlier, use kUTTypeFolder
|
|
115
|
+
let picker = UIDocumentPickerViewController(documentTypes: [kUTTypeFolder as String], in: .open)
|
|
116
|
+
if let initialUri = initialUri {
|
|
117
|
+
picker.directoryURL = initialUri
|
|
118
|
+
}
|
|
119
|
+
return picker
|
|
120
|
+
}
|
|
121
|
+
|
|
89
122
|
@available(iOS 14.0, *)
|
|
90
123
|
private func toUTType(mimeType: String) -> UTType? {
|
|
91
124
|
switch mimeType {
|
|
@@ -6,27 +6,28 @@ internal final class FileSystemDirectory: FileSystemPath {
|
|
|
6
6
|
super.init(url: url, isDirectory: true)
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
func validateType() throws {
|
|
10
|
-
try
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
override func validateType() throws {
|
|
10
|
+
try withCorrectTypeAndScopedAccess(permission: .read) {
|
|
11
|
+
var isDirectory: ObjCBool = false
|
|
12
|
+
if FileManager.default.fileExists(atPath: url.path, isDirectory: &isDirectory) {
|
|
13
|
+
if !isDirectory.boolValue {
|
|
14
|
+
throw InvalidTypeDirectoryException()
|
|
15
|
+
}
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
func create(_ options: CreateOptions) throws {
|
|
20
|
-
try
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
try withCorrectTypeAndScopedAccess(permission: .write) {
|
|
22
|
+
guard try needsCreation(options) else {
|
|
23
|
+
return
|
|
24
|
+
}
|
|
25
|
+
try validateCanCreate(options)
|
|
26
|
+
do {
|
|
27
|
+
try FileManager.default.createDirectory(at: url, withIntermediateDirectories: options.intermediates, attributes: nil)
|
|
28
|
+
} catch {
|
|
29
|
+
throw UnableToCreateException(error.localizedDescription)
|
|
30
|
+
}
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -61,14 +62,15 @@ internal final class FileSystemDirectory: FileSystemPath {
|
|
|
61
62
|
|
|
62
63
|
// Internal only function
|
|
63
64
|
func listAsRecords() throws -> [[String: Any]] {
|
|
64
|
-
try
|
|
65
|
+
try withCorrectTypeAndScopedAccess(permission: .read) {
|
|
65
66
|
var contents: [[String: Any]] = []
|
|
66
67
|
|
|
67
68
|
let items = try FileManager.default.contentsOfDirectory(at: url, includingPropertiesForKeys: nil)
|
|
68
69
|
for item in items {
|
|
69
70
|
contents.append(["isDirectory": item.hasDirectoryPath, "uri": item.absoluteString])
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
+
return contents
|
|
73
|
+
}
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
func validatePath() throws {
|
|
@@ -78,26 +80,26 @@ internal final class FileSystemDirectory: FileSystemPath {
|
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
func info() throws -> DirectoryInfo {
|
|
81
|
-
try
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
83
|
+
try withCorrectTypeAndScopedAccess(permission: .read) {
|
|
84
|
+
if !exists {
|
|
85
|
+
let result = DirectoryInfo()
|
|
86
|
+
result.exists = false
|
|
87
|
+
result.uri = url.absoluteString
|
|
88
|
+
return result
|
|
89
|
+
}
|
|
90
|
+
switch url.scheme {
|
|
91
|
+
case "file":
|
|
92
|
+
let result = DirectoryInfo()
|
|
93
|
+
result.exists = true
|
|
94
|
+
result.uri = url.absoluteString
|
|
95
|
+
result.size = try size
|
|
96
|
+
result.files = (try? FileManager.default.contentsOfDirectory(atPath: url.path)) ?? []
|
|
97
|
+
result.modificationTime = try modificationTime
|
|
98
|
+
result.creationTime = try creationTime
|
|
99
|
+
return result
|
|
100
|
+
default:
|
|
101
|
+
throw UnableToGetInfoException("url scheme \(String(describing: url.scheme)) is not supported")
|
|
102
|
+
}
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
|
|
@@ -91,6 +91,12 @@ internal final class FilePickingCancelledException: Exception {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
internal final class NotImplementedException: Exception {
|
|
95
|
+
override var reason: String {
|
|
96
|
+
"Not implemented"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
94
100
|
internal final class FeatureNotAvailableOnPlatformException: Exception {
|
|
95
101
|
override var reason: String {
|
|
96
102
|
"This feature is not available on this platform"
|
package/ios/FileSystemFile.swift
CHANGED
|
@@ -8,7 +8,7 @@ internal final class FileSystemFile: FileSystemPath {
|
|
|
8
8
|
super.init(url: url, isDirectory: false)
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
func validateType() throws {
|
|
11
|
+
override func validateType() throws {
|
|
12
12
|
var isDirectory: ObjCBool = false
|
|
13
13
|
if FileManager.default.fileExists(atPath: url.path, isDirectory: &isDirectory) {
|
|
14
14
|
if isDirectory.boolValue {
|
|
@@ -18,17 +18,17 @@ internal final class FileSystemFile: FileSystemPath {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
func create(_ options: CreateOptions) throws {
|
|
21
|
-
try
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
try withCorrectTypeAndScopedAccess(permission: .write) {
|
|
22
|
+
try validateCanCreate(options)
|
|
23
|
+
do {
|
|
24
|
+
if options.intermediates {
|
|
25
|
+
try FileManager.default.createDirectory(at: url.deletingLastPathComponent(), withIntermediateDirectories: true)
|
|
26
|
+
}
|
|
27
|
+
try? FileManager.default.removeItem(atPath: url.path)
|
|
28
|
+
FileManager.default.createFile(atPath: url.path, contents: nil)
|
|
29
|
+
} catch {
|
|
30
|
+
throw UnableToCreateException(error.localizedDescription)
|
|
27
31
|
}
|
|
28
|
-
try? FileManager.default.removeItem(atPath: url.path)
|
|
29
|
-
FileManager.default.createFile(atPath: url.path, contents: nil)
|
|
30
|
-
} catch {
|
|
31
|
-
throw UnableToCreateException(error.localizedDescription)
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -52,10 +52,11 @@ internal final class FileSystemFile: FileSystemPath {
|
|
|
52
52
|
|
|
53
53
|
var md5: String {
|
|
54
54
|
get throws {
|
|
55
|
-
try
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
return try withCorrectTypeAndScopedAccess(permission: .read) {
|
|
56
|
+
let fileData = try Data(contentsOf: url)
|
|
57
|
+
let hash = Insecure.MD5.hash(data: fileData)
|
|
58
|
+
return hash.map { String(format: "%02hhx", $0) }.joined()
|
|
59
|
+
}
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -75,58 +76,59 @@ internal final class FileSystemFile: FileSystemPath {
|
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
func write(_ content: String) throws {
|
|
78
|
-
try
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
try withCorrectTypeAndScopedAccess(permission: .write) {
|
|
80
|
+
try content.write(to: url, atomically: false, encoding: .utf8) // TODO: better error handling
|
|
81
|
+
}
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
// TODO: blob support
|
|
84
85
|
func write(_ content: TypedArray) throws {
|
|
85
|
-
try
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
try withCorrectTypeAndScopedAccess(permission: .write) {
|
|
87
|
+
try Data(bytes: content.rawPointer, count: content.byteLength).write(to: url)
|
|
88
|
+
}
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
func text() throws -> String {
|
|
91
|
-
try
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
return try withCorrectTypeAndScopedAccess(permission: .write) {
|
|
93
|
+
return try String(contentsOf: url)
|
|
94
|
+
}
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
func bytes() throws -> Data {
|
|
97
|
-
try
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
return try withCorrectTypeAndScopedAccess(permission: .write) {
|
|
99
|
+
return try Data(contentsOf: url)
|
|
100
|
+
}
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
func base64() throws -> String {
|
|
103
|
-
try
|
|
104
|
-
|
|
104
|
+
return try withCorrectTypeAndScopedAccess(permission: .read) {
|
|
105
|
+
return try Data(contentsOf: url).base64EncodedString()
|
|
106
|
+
}
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
func info(options: InfoOptions) throws -> FileInfo {
|
|
108
|
-
try
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
110
|
+
return try withCorrectTypeAndScopedAccess(permission: .read) {
|
|
111
|
+
if !exists {
|
|
112
|
+
let result = FileInfo()
|
|
113
|
+
result.exists = false
|
|
114
|
+
result.uri = url.absoluteString
|
|
115
|
+
return result
|
|
116
|
+
}
|
|
117
|
+
switch url.scheme {
|
|
118
|
+
case "file":
|
|
119
|
+
let result = FileInfo()
|
|
120
|
+
result.exists = true
|
|
121
|
+
result.uri = url.absoluteString
|
|
122
|
+
result.size = try size
|
|
123
|
+
result.modificationTime = try modificationTime
|
|
124
|
+
result.creationTime = try creationTime
|
|
125
|
+
if options.md5 {
|
|
126
|
+
result.md5 = try md5
|
|
127
|
+
}
|
|
128
|
+
return result
|
|
129
|
+
default:
|
|
130
|
+
throw UnableToGetInfoException("url scheme \(String(describing: url.scheme)) is not supported")
|
|
126
131
|
}
|
|
127
|
-
return result
|
|
128
|
-
default:
|
|
129
|
-
throw UnableToGetInfoException("url scheme \(String(describing: url.scheme)) is not supported")
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
}
|
|
@@ -106,6 +106,20 @@ public final class FileSystemModule: Module {
|
|
|
106
106
|
downloadTask.resume()
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
AsyncFunction("pickDirectoryAsync") { (initialUri: URL?, promise: Promise) in
|
|
110
|
+
#if os(iOS)
|
|
111
|
+
filePickingHandler.presentDocumentPicker(
|
|
112
|
+
picker: createDirectoryPicker(initialUri: initialUri),
|
|
113
|
+
isDirectory: true,
|
|
114
|
+
initialUri: initialUri,
|
|
115
|
+
mimeType: nil,
|
|
116
|
+
promise: promise
|
|
117
|
+
)
|
|
118
|
+
#else
|
|
119
|
+
promise.reject(FeatureNotAvailableOnPlatformException())
|
|
120
|
+
#endif
|
|
121
|
+
}.runOnQueue(.main)
|
|
122
|
+
|
|
109
123
|
AsyncFunction("pickFileAsync") { (initialUri: URL?, mimeType: String?, promise: Promise) in
|
|
110
124
|
#if os(iOS)
|
|
111
125
|
filePickingHandler.presentDocumentPicker(
|
package/ios/FileSystemPath.swift
CHANGED
|
@@ -4,6 +4,10 @@ import ExpoModulesCore
|
|
|
4
4
|
internal class FileSystemPath: SharedObject {
|
|
5
5
|
var url: URL
|
|
6
6
|
|
|
7
|
+
func validateType() throws {
|
|
8
|
+
throw NotImplementedException()
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
init(url: URL, isDirectory: Bool) {
|
|
8
12
|
let standardizedUrl = url.deletingLastPathComponent().appendingPathComponent(url.lastPathComponent, isDirectory: isDirectory)
|
|
9
13
|
self.url = standardizedUrl
|
|
@@ -115,4 +119,17 @@ internal class FileSystemPath: SharedObject {
|
|
|
115
119
|
}
|
|
116
120
|
return attributeCasted
|
|
117
121
|
}
|
|
122
|
+
|
|
123
|
+
@discardableResult
|
|
124
|
+
func withCorrectTypeAndScopedAccess<T>(
|
|
125
|
+
permission: FileSystemPermissionFlags,
|
|
126
|
+
_ work: () throws -> T
|
|
127
|
+
) throws -> T {
|
|
128
|
+
let accessed = url.startAccessingSecurityScopedResource()
|
|
129
|
+
defer { if accessed { url.stopAccessingSecurityScopedResource() } }
|
|
130
|
+
|
|
131
|
+
try validatePermission(permission)
|
|
132
|
+
|
|
133
|
+
return try work()
|
|
134
|
+
}
|
|
118
135
|
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
393ebd0bb15c84c2251df0dba55049b4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d6f2c0f72cd8798791ef0c2427a8dc27451d1c49
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
24ecb7d1223c1ed7b11208f7ba90b688b68f69316b557aa53fa4850560eff347
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8c00661df12bf3a0124f5bab782d544bef6a0f06340ac9f86c2d3f2c5384d542c242dce0d832f9960da4adb5cd7bbb576bd8fa55a6de439890ee7403efd08fe3
|
|
@@ -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.12",
|
|
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.12.aar",
|
|
79
|
+
"url": "expo.modules.filesystem-19.0.12.aar",
|
|
80
|
+
"size": 386425,
|
|
81
|
+
"sha512": "8c00661df12bf3a0124f5bab782d544bef6a0f06340ac9f86c2d3f2c5384d542c242dce0d832f9960da4adb5cd7bbb576bd8fa55a6de439890ee7403efd08fe3",
|
|
82
|
+
"sha256": "24ecb7d1223c1ed7b11208f7ba90b688b68f69316b557aa53fa4850560eff347",
|
|
83
|
+
"sha1": "d6f2c0f72cd8798791ef0c2427a8dc27451d1c49",
|
|
84
|
+
"md5": "393ebd0bb15c84c2251df0dba55049b4"
|
|
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.12.aar",
|
|
157
|
+
"url": "expo.modules.filesystem-19.0.12.aar",
|
|
158
|
+
"size": 386425,
|
|
159
|
+
"sha512": "8c00661df12bf3a0124f5bab782d544bef6a0f06340ac9f86c2d3f2c5384d542c242dce0d832f9960da4adb5cd7bbb576bd8fa55a6de439890ee7403efd08fe3",
|
|
160
|
+
"sha256": "24ecb7d1223c1ed7b11208f7ba90b688b68f69316b557aa53fa4850560eff347",
|
|
161
|
+
"sha1": "d6f2c0f72cd8798791ef0c2427a8dc27451d1c49",
|
|
162
|
+
"md5": "393ebd0bb15c84c2251df0dba55049b4"
|
|
163
163
|
}
|
|
164
164
|
]
|
|
165
165
|
},
|
|
@@ -173,8 +173,8 @@
|
|
|
173
173
|
},
|
|
174
174
|
"files": [
|
|
175
175
|
{
|
|
176
|
-
"name": "expo.modules.filesystem-19.0.
|
|
177
|
-
"url": "expo.modules.filesystem-19.0.
|
|
176
|
+
"name": "expo.modules.filesystem-19.0.12-sources.jar",
|
|
177
|
+
"url": "expo.modules.filesystem-19.0.12-sources.jar",
|
|
178
178
|
"size": 28550,
|
|
179
179
|
"sha512": "b8f0a84aa8f6377f6fb162699e663d8e9de63caff453a37513e1cfeeaaa050261f8ae32032f15e8968e8591d518531d46e8e549c745b2998ee16fc7578903872",
|
|
180
180
|
"sha256": "267e88a3c5d6745c834050282f9a45c0305f51c7b8554e18e0b68a16ab337edb",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
40b60a1bf4ed70513de76fba83fa9ae0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
753e61606e66e7d33608724e3d3c514ee6aab468
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a4089584130ba7bbbc1ab3698343331bf52d9df50937b6ec98df6d82025ebc71
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
80e530718baf2ec22e4666618d47f3758ddd549403882c90979f7aedb20863eeb66bc2ed1b3c340360463171776e830dab55746067c3a7ccea8450a4b5e7dd8e
|
|
@@ -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.12</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
|
+
55c3b489bfa7c2818a36d4e68a1c7c19
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b0d1c54ac885c23afb248eec2fff7bb8c8794837
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3996bb0f770e1f9e723c0d3c65e15467af8c5e30682866e292ef00a3bb9d3de4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
01c18c372e585031bce85f13aa101fbc62decaf7cf4a1cf56a0a7f4123d7325251c64a6d12231717eeb6a6e5c5856cffd5abf4c88ea646541f60f2b6a85cf388
|
|
@@ -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.12</latest>
|
|
7
|
+
<release>19.0.12</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>19.0.
|
|
9
|
+
<version>19.0.12</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250911202150</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
22e12597122d142a5232a495c93fe716
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
34bd1d4797ad300ff60ce225af19313088908f58
|
package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c6f8b319fa9914eaf58a9a23f38151c3c82385c6d476370d793634aa675dd5a1
|
package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha512
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1b6471257f9356720d3165d70b80505a7ff324fabaaab3b9d0856d232d4dac536aa1fc17e04e1a89331efcf23d6e7acfb2ad3f6cbf0458e291455390dfcb1f31
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-file-system",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.12",
|
|
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,12 +35,12 @@
|
|
|
35
35
|
"preset": "expo-module-scripts"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"expo-module-scripts": "^5.0.
|
|
39
|
-
"jest-expo": "~54.0.
|
|
38
|
+
"expo-module-scripts": "^5.0.7",
|
|
39
|
+
"jest-expo": "~54.0.10"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"expo": "*",
|
|
43
43
|
"react-native": "*"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "088e79428be97cf3ee11fc93e0e5a1fc1c8bea1e"
|
|
46
46
|
}
|
|
@@ -122,9 +122,11 @@ export declare class Directory {
|
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* A static method that opens a file picker to select a directory.
|
|
125
|
+
*
|
|
126
|
+
* On iOS, the selected directory grants temporary read and write access for the current app session only. After the app restarts, you must prompt the user again to regain access.
|
|
127
|
+
*
|
|
125
128
|
* @param initialUri An optional uri pointing to an initial folder on which the directory picker is opened.
|
|
126
|
-
* @returns a `Directory` instance.
|
|
127
|
-
* @platform android
|
|
129
|
+
* @returns a `Directory` instance. On Android, the underlying uri will be a content URI.
|
|
128
130
|
*/
|
|
129
131
|
static pickDirectoryAsync(initialUri?: string): Promise<Directory>;
|
|
130
132
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
class FileSystemFile {
|
|
2
|
+
constructor() {
|
|
3
|
+
console.warn('expo-file-system is not supported on web');
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
class FileSystemDirectory {
|
|
8
|
+
constructor() {
|
|
9
|
+
console.warn('expo-file-system is not supported on web');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
FileSystemDirectory,
|
|
15
|
+
FileSystemFile,
|
|
16
|
+
downloadFileAsync: () => {
|
|
17
|
+
console.warn('expo-file-system is not supported on web');
|
|
18
|
+
return Promise.resolve();
|
|
19
|
+
},
|
|
20
|
+
pickDirectoryAsync: () => {
|
|
21
|
+
console.warn('expo-file-system is not supported on web');
|
|
22
|
+
return Promise.resolve();
|
|
23
|
+
},
|
|
24
|
+
pickFileAsync: () => {
|
|
25
|
+
console.warn('expo-file-system is not supported on web');
|
|
26
|
+
return Promise.resolve();
|
|
27
|
+
},
|
|
28
|
+
get totalDiskSpace(): number {
|
|
29
|
+
console.warn('expo-file-system is not supported on web');
|
|
30
|
+
return 0;
|
|
31
|
+
},
|
|
32
|
+
get availableDiskSpace(): number {
|
|
33
|
+
console.warn('expo-file-system is not supported on web');
|
|
34
|
+
return 0;
|
|
35
|
+
},
|
|
36
|
+
get documentDirectory(): string {
|
|
37
|
+
console.warn('expo-file-system is not supported on web');
|
|
38
|
+
return '';
|
|
39
|
+
},
|
|
40
|
+
get cacheDirectory(): string {
|
|
41
|
+
console.warn('expo-file-system is not supported on web');
|
|
42
|
+
return '';
|
|
43
|
+
},
|
|
44
|
+
get bundleDirectory(): string {
|
|
45
|
+
console.warn('expo-file-system is not supported on web');
|
|
46
|
+
return '';
|
|
47
|
+
},
|
|
48
|
+
};
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f65233b7c5a0ddbfa68c89c8dcd996dc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6b7ed4241eba9ffbf0df1ee9694b86db9cd7724a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
eade379437d3745877e3a6c3fd849dc24673b01a7c36a1746192785bbdff16ed
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4664260638daa31c250a98d8b498932db101396b77116fc31c91deb8ef303685d1efebac87f80671cd76f5e2994938209066f47ebe5e05616b6ef85a1e04dcb6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c4b723f155418c3413d567ef2fb42a9e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
7d9451de39f389aeace7211771fdb60ad8046128
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5e185a4e3e3bd2024c19828c6e9d242e97b9cab479a3c90bb88dde1bab2e4604
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1857d26c441d7ef4f2238795fa6bc224126edb79186792d5f4876eae34e601d79296b002d468709dcb9fb9dcf7d6bcc268eed19aa2b171efced3ba9eeee797e4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9cfb03f0599dfa8582d42e142350f2a6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c209c54524ea80a46b717bad2f058d74f7bded6e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
32d5df40ca69a6ff3fd7950489d44a91ad77c85d1b925eabfd10d29b53c8ef98
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
606848160829b227a708b5ad8de879f2ef4b20c6284742727df476572e82c36dc1f648ae339b0f60ed87d305ebdb0dc15a4a447114fcd05782d89a5aeb228281
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|