expo-file-system 19.0.3 → 19.0.5
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 +8 -0
- package/android/build.gradle +2 -2
- package/build/ExpoFileSystem.types.d.ts +18 -9
- package/build/ExpoFileSystem.types.d.ts.map +1 -1
- package/build/FileSystem.d.ts +27 -6
- 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.3/expo.modules.filesystem-19.0.3.module → 19.0.5/expo.modules.filesystem-19.0.5.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.5/expo.modules.filesystem-19.0.5.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.5/expo.modules.filesystem-19.0.5.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.5/expo.modules.filesystem-19.0.5.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.5/expo.modules.filesystem-19.0.5.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.3/expo.modules.filesystem-19.0.3.pom → 19.0.5/expo.modules.filesystem-19.0.5.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.5/expo.modules.filesystem-19.0.5.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.5/expo.modules.filesystem-19.0.5.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.5/expo.modules.filesystem-19.0.5.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.5/expo.modules.filesystem-19.0.5.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 +18 -9
- package/src/FileSystem.ts +27 -6
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/19.0.3/expo.modules.filesystem-19.0.3.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.3/expo.modules.filesystem-19.0.3-sources.jar → 19.0.5/expo.modules.filesystem-19.0.5-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 → 19.0.5/expo.modules.filesystem-19.0.5-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.3/expo.modules.filesystem-19.0.3-sources.jar.sha1 → 19.0.5/expo.modules.filesystem-19.0.5-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.3/expo.modules.filesystem-19.0.3-sources.jar.sha256 → 19.0.5/expo.modules.filesystem-19.0.5-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.3/expo.modules.filesystem-19.0.3-sources.jar.sha512 → 19.0.5/expo.modules.filesystem-19.0.5-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.3/expo.modules.filesystem-19.0.3.aar → 19.0.5/expo.modules.filesystem-19.0.5.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.3/expo.modules.filesystem-19.0.3.aar.md5 → 19.0.5/expo.modules.filesystem-19.0.5.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.3/expo.modules.filesystem-19.0.3.aar.sha1 → 19.0.5/expo.modules.filesystem-19.0.5.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.3/expo.modules.filesystem-19.0.3.aar.sha256 → 19.0.5/expo.modules.filesystem-19.0.5.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/{19.0.3/expo.modules.filesystem-19.0.3.aar.sha512 → 19.0.5/expo.modules.filesystem-19.0.5.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 19.0.5 — 2025-08-25
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 19.0.4 — 2025-08-21
|
|
18
|
+
|
|
19
|
+
_This version does not introduce any user-facing changes._
|
|
20
|
+
|
|
13
21
|
## 19.0.3 — 2025-08-18
|
|
14
22
|
|
|
15
23
|
### 🐛 Bug fixes
|
package/android/build.gradle
CHANGED
|
@@ -69,9 +69,11 @@ export declare class Directory {
|
|
|
69
69
|
*/
|
|
70
70
|
list(): (Directory | File)[];
|
|
71
71
|
/**
|
|
72
|
-
* Retrieves an object containing properties of a directory
|
|
72
|
+
* Retrieves an object containing properties of a directory.
|
|
73
|
+
*
|
|
73
74
|
* @throws Error If the application does not have read access to the directory, or if the path does not point to a directory (e.g., it points to a file).
|
|
74
|
-
*
|
|
75
|
+
*
|
|
76
|
+
* @returns An object with directory metadata (for example, size, creation date, and so on).
|
|
75
77
|
*/
|
|
76
78
|
info(): DirectoryInfo;
|
|
77
79
|
/**
|
|
@@ -79,10 +81,10 @@ export declare class Directory {
|
|
|
79
81
|
*/
|
|
80
82
|
size: number | null;
|
|
81
83
|
/**
|
|
82
|
-
* @platform android
|
|
83
84
|
* A static method that opens a file picker to select a directory.
|
|
84
85
|
* @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
|
|
86
|
+
* @returns a `Directory` instance. The underlying uri will be a content URI on Android.
|
|
87
|
+
* @platform android
|
|
86
88
|
*/
|
|
87
89
|
static pickDirectoryAsync(initialUri?: string): Promise<Directory>;
|
|
88
90
|
}
|
|
@@ -156,8 +158,8 @@ export declare class File {
|
|
|
156
158
|
delete(): void;
|
|
157
159
|
/**
|
|
158
160
|
* Retrieves an object containing properties of a file
|
|
159
|
-
* @throws Error If the application does not have read access to the file, or if the path does not point to a file (
|
|
160
|
-
* @returns An object with file metadata (
|
|
161
|
+
* @throws Error If the application does not have read access to the file, or if the path does not point to a file (for example, it points to a directory).
|
|
162
|
+
* @returns An object with file metadata (for example, size, creation date, and so on).
|
|
161
163
|
*/
|
|
162
164
|
info(options?: InfoOptions): FileInfo;
|
|
163
165
|
/**
|
|
@@ -180,15 +182,18 @@ export declare class File {
|
|
|
180
182
|
*/
|
|
181
183
|
move(destination: Directory | File): void;
|
|
182
184
|
/**
|
|
183
|
-
* Returns
|
|
185
|
+
* Returns A `FileHandle` object that can be used to read and write data to the file.
|
|
184
186
|
* @throws Error if the file does not exist or cannot be opened.
|
|
185
187
|
*/
|
|
186
188
|
open(): FileHandle;
|
|
187
189
|
/**
|
|
188
190
|
* A static method that downloads a file from the network.
|
|
191
|
+
*
|
|
189
192
|
* @param url - The URL of the file to download.
|
|
190
193
|
* @param destination - The destination directory or file. If a directory is provided, the resulting filename will be determined based on the response headers.
|
|
194
|
+
*
|
|
191
195
|
* @returns A promise that resolves to the downloaded file.
|
|
196
|
+
*
|
|
192
197
|
* @example
|
|
193
198
|
* ```ts
|
|
194
199
|
* const file = await File.downloadFileAsync("https://example.com/image.png", new Directory(Paths.document));
|
|
@@ -196,11 +201,14 @@ export declare class File {
|
|
|
196
201
|
*/
|
|
197
202
|
static downloadFileAsync(url: string, destination: Directory | File, options?: DownloadOptions): Promise<File>;
|
|
198
203
|
/**
|
|
199
|
-
* @platform android
|
|
200
204
|
* A static method that opens a file picker to select a single file of specified type.
|
|
201
|
-
*
|
|
205
|
+
*
|
|
206
|
+
* @platform android
|
|
207
|
+
*
|
|
208
|
+
* @param initialUri An optional URI pointing to an initial folder on which the file picker is opened.
|
|
202
209
|
* @param mimeType A mime type that is used to filter out files that can be picked out.
|
|
203
210
|
* @returns a `File` instance.
|
|
211
|
+
* @platform android
|
|
204
212
|
*/
|
|
205
213
|
static pickFileAsync(initialUri?: string, mimeType?: string): Promise<File>;
|
|
206
214
|
/**
|
|
@@ -260,6 +268,7 @@ export type FileInfo = {
|
|
|
260
268
|
export type InfoOptions = {
|
|
261
269
|
/**
|
|
262
270
|
* Whether to return the MD5 hash of the file.
|
|
271
|
+
*
|
|
263
272
|
* @default false
|
|
264
273
|
*/
|
|
265
274
|
md5?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoFileSystem.types.d.ts","sourceRoot":"","sources":["../src/ExpoFileSystem.types.ts"],"names":[],"mappings":"AAAA,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;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/build/FileSystem.d.ts
CHANGED
|
@@ -28,13 +28,26 @@ export declare class Paths extends PathUtilities {
|
|
|
28
28
|
*/
|
|
29
29
|
static info(...uris: string[]): PathInfo;
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Represents a file on the filesystem.
|
|
33
|
+
*
|
|
34
|
+
* A `File` instance can be created for any path, and does not need to exist on the filesystem during creation.
|
|
35
|
+
*
|
|
36
|
+
* The constructor accepts an array of strings that are joined to create the file URI. The first argument can also be a `Directory` instance (like `Paths.cache`) or a `File` instance (which creates a new reference to the same file).
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const file = new File(File.cache, "subdirName", "file.txt");
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
31
42
|
export declare class File extends ExpoFileSystem.FileSystemFile implements Blob {
|
|
32
43
|
/**
|
|
33
|
-
* Creates an instance of a file.
|
|
34
|
-
*
|
|
44
|
+
* Creates an instance of a file. It can be created for any path, and does not need to exist on the filesystem during creation.
|
|
45
|
+
*
|
|
46
|
+
* The constructor accepts an array of strings that are joined to create the file URI. The first argument can also be a `Directory` instance (like `Paths.cache`) or a `File` instance (which creates a new reference to the same file).
|
|
47
|
+
* @param uris An array of: `file:///` string URIs, `File` instances, and `Directory` instances representing an arbitrary location on the file system.
|
|
35
48
|
* @example
|
|
36
49
|
* ```ts
|
|
37
|
-
* const file = new File("file
|
|
50
|
+
* const file = new File(File.cache, "subdirName", "file.txt");
|
|
38
51
|
* ```
|
|
39
52
|
*/
|
|
40
53
|
constructor(...uris: (string | File | Directory)[]);
|
|
@@ -58,14 +71,22 @@ export declare class File extends ExpoFileSystem.FileSystemFile implements Blob
|
|
|
58
71
|
* Represents a directory on the filesystem.
|
|
59
72
|
*
|
|
60
73
|
* A `Directory` instance can be created for any path, and does not need to exist on the filesystem during creation.
|
|
74
|
+
*
|
|
75
|
+
* The constructor accepts an array of strings that are joined to create the directory URI. The first argument can also be a `Directory` instance (like `Paths.cache`).
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const directory = new Directory(File.cache, "subdirName");
|
|
79
|
+
* ```
|
|
61
80
|
*/
|
|
62
81
|
export declare class Directory extends ExpoFileSystem.FileSystemDirectory {
|
|
63
82
|
/**
|
|
64
|
-
* Creates an instance of a directory.
|
|
65
|
-
*
|
|
83
|
+
* Creates an instance of a directory. It can be created for any path, and does not need to exist on the filesystem during creation.
|
|
84
|
+
*
|
|
85
|
+
* The constructor accepts an array of strings that are joined to create the directory URI. The first argument can also be a `Directory` instance (like `Paths.cache`).
|
|
86
|
+
* @param uris An array of: `file:///` string URIs, `File` instances, and `Directory` instances representing an arbitrary location on the file system.
|
|
66
87
|
* @example
|
|
67
88
|
* ```ts
|
|
68
|
-
* const directory = new Directory("
|
|
89
|
+
* const directory = new Directory(File.cache, "subdirName");
|
|
69
90
|
* ```
|
|
70
91
|
*/
|
|
71
92
|
constructor(...uris: (string | File | Directory)[]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileSystem.d.ts","sourceRoot":"","sources":["../src/FileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAmB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,qBAAa,KAAM,SAAQ,aAAa;IACtC;;OAEG;IACH,MAAM,KAAK,KAAK,cAEf;IAED;;OAEG;IACH,MAAM,KAAK,MAAM,cAEhB;IAED;;OAEG;IACH,MAAM,KAAK,QAAQ,cAElB;IACD,MAAM,KAAK,qBAAqB,8BAS/B;IAED;;OAEG;IACH,M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,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;CAGhE;AAiBD;;;;;;;;;;GAUG;AACH,qBAAa,SAAU,SAAQ,cAAc,CAAC,mBAAmB;IAC/D;;;;;;;;;OASG;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
|
@@ -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.5",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
],
|
|
76
76
|
"files": [
|
|
77
77
|
{
|
|
78
|
-
"name": "expo.modules.filesystem-19.0.
|
|
79
|
-
"url": "expo.modules.filesystem-19.0.
|
|
78
|
+
"name": "expo.modules.filesystem-19.0.5.aar",
|
|
79
|
+
"url": "expo.modules.filesystem-19.0.5.aar",
|
|
80
80
|
"size": 373316,
|
|
81
81
|
"sha512": "36dc7ab692103570111d72588e7674ae1c7cf2c0665a351738f87dc0af98dbccb34aef221f34b5630403f2d6fd46a13cd22e4b3fb75a90f6b8b0bc2a41dd49cf",
|
|
82
82
|
"sha256": "977ef17ccaa7a6f8c09c70d2f2f2f0c1002f07df8b3756ce3905a37a7288b41b",
|
|
@@ -153,8 +153,8 @@
|
|
|
153
153
|
],
|
|
154
154
|
"files": [
|
|
155
155
|
{
|
|
156
|
-
"name": "expo.modules.filesystem-19.0.
|
|
157
|
-
"url": "expo.modules.filesystem-19.0.
|
|
156
|
+
"name": "expo.modules.filesystem-19.0.5.aar",
|
|
157
|
+
"url": "expo.modules.filesystem-19.0.5.aar",
|
|
158
158
|
"size": 373316,
|
|
159
159
|
"sha512": "36dc7ab692103570111d72588e7674ae1c7cf2c0665a351738f87dc0af98dbccb34aef221f34b5630403f2d6fd46a13cd22e4b3fb75a90f6b8b0bc2a41dd49cf",
|
|
160
160
|
"sha256": "977ef17ccaa7a6f8c09c70d2f2f2f0c1002f07df8b3756ce3905a37a7288b41b",
|
|
@@ -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.5-sources.jar",
|
|
177
|
+
"url": "expo.modules.filesystem-19.0.5-sources.jar",
|
|
178
178
|
"size": 28421,
|
|
179
179
|
"sha512": "c91977ae610fa808ea0765cd14182ad1d8961f59cbdf2df2396e7f77fe8cadbcd152018902a4f09474177b5ea77f78c107d6016c127d0546c4e9b0ebbf2b13fe",
|
|
180
180
|
"sha256": "9cf826cfa827700e415e780bc1b4a49477ea31486d465154824b7331c89e9dc7",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
423f97e182b388b0bb864d1c6e99e176
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5acaf624a6f86152dacf4b05b60fc91284f4abad
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b80fb6ce987e4b7f65e72affdcd4f6988d96a3af110cc40a3760c15dd19b2c5c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dad6ebef53bb0ca799675f417c47aa5e4d089c35db21f88e9c8a570604aa4970255519944131428df5a2a20d434d93693a9fc93773db9db2d25ce2825aa6d304
|
|
@@ -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.5</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
|
+
53a2ad7b85bf8e39dccdc490e4aac2a7
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fe337162a65850593acb70d1c3a3620da4c7a356
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
68c8f32767b0549b2e733d132cb21ac82bd86fb0e8fbff4b0529a6838d0fc438
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8377212c44357f227e871376bd85a005aae507df0851780cc0f12d6ce946b81e6029edf05c58625077387b474e1dd87af730f31180009387a1f9c64e21c732ab
|
|
@@ -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.5</latest>
|
|
7
|
+
<release>19.0.5</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>19.0.
|
|
9
|
+
<version>19.0.5</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250825161907</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7bcef1846b11745f444541f602117f32
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
651729a270d482d1a8d111f3955875e0cb25f905
|
package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f9657fccdaffaef75d442cc36cdf0cc203bc358226c7220f1ab6695a3ee1fdd5
|
package/local-maven-repo/host/exp/exponent/expo.modules.filesystem/maven-metadata.xml.sha512
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
db43a9e891bb1afca0c9f43724e00a1e2ced2dfa353934f8e77d8942bc76b2be6a30fc86c9e03ba94214a26c4ed0e19fdbe72851f31a882e39d9973a50359dd5
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-file-system",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.5",
|
|
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.3",
|
|
39
|
+
"jest-expo": "~54.0.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"expo": "*",
|
|
43
43
|
"react-native": "*"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "ef0b9ecf9645d3e93587d5ee5030dbfcbf735bbd"
|
|
46
46
|
}
|
|
@@ -79,9 +79,11 @@ export declare class Directory {
|
|
|
79
79
|
list(): (Directory | File)[];
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* Retrieves an object containing properties of a directory
|
|
82
|
+
* Retrieves an object containing properties of a directory.
|
|
83
|
+
*
|
|
83
84
|
* @throws Error If the application does not have read access to the directory, or if the path does not point to a directory (e.g., it points to a file).
|
|
84
|
-
*
|
|
85
|
+
*
|
|
86
|
+
* @returns An object with directory metadata (for example, size, creation date, and so on).
|
|
85
87
|
*/
|
|
86
88
|
info(): DirectoryInfo;
|
|
87
89
|
|
|
@@ -91,10 +93,10 @@ export declare class Directory {
|
|
|
91
93
|
size: number | null;
|
|
92
94
|
|
|
93
95
|
/**
|
|
94
|
-
* @platform android
|
|
95
96
|
* A static method that opens a file picker to select a directory.
|
|
96
97
|
* @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
|
|
98
|
+
* @returns a `Directory` instance. The underlying uri will be a content URI on Android.
|
|
99
|
+
* @platform android
|
|
98
100
|
*/
|
|
99
101
|
static pickDirectoryAsync(initialUri?: string): Promise<Directory>;
|
|
100
102
|
}
|
|
@@ -181,8 +183,8 @@ export declare class File {
|
|
|
181
183
|
|
|
182
184
|
/**
|
|
183
185
|
* Retrieves an object containing properties of a file
|
|
184
|
-
* @throws Error If the application does not have read access to the file, or if the path does not point to a file (
|
|
185
|
-
* @returns An object with file metadata (
|
|
186
|
+
* @throws Error If the application does not have read access to the file, or if the path does not point to a file (for example, it points to a directory).
|
|
187
|
+
* @returns An object with file metadata (for example, size, creation date, and so on).
|
|
186
188
|
*/
|
|
187
189
|
info(options?: InfoOptions): FileInfo;
|
|
188
190
|
|
|
@@ -210,16 +212,19 @@ export declare class File {
|
|
|
210
212
|
move(destination: Directory | File): void;
|
|
211
213
|
|
|
212
214
|
/**
|
|
213
|
-
* Returns
|
|
215
|
+
* Returns A `FileHandle` object that can be used to read and write data to the file.
|
|
214
216
|
* @throws Error if the file does not exist or cannot be opened.
|
|
215
217
|
*/
|
|
216
218
|
open(): FileHandle;
|
|
217
219
|
|
|
218
220
|
/**
|
|
219
221
|
* A static method that downloads a file from the network.
|
|
222
|
+
*
|
|
220
223
|
* @param url - The URL of the file to download.
|
|
221
224
|
* @param destination - The destination directory or file. If a directory is provided, the resulting filename will be determined based on the response headers.
|
|
225
|
+
*
|
|
222
226
|
* @returns A promise that resolves to the downloaded file.
|
|
227
|
+
*
|
|
223
228
|
* @example
|
|
224
229
|
* ```ts
|
|
225
230
|
* const file = await File.downloadFileAsync("https://example.com/image.png", new Directory(Paths.document));
|
|
@@ -232,11 +237,14 @@ export declare class File {
|
|
|
232
237
|
): Promise<File>;
|
|
233
238
|
|
|
234
239
|
/**
|
|
235
|
-
* @platform android
|
|
236
240
|
* A static method that opens a file picker to select a single file of specified type.
|
|
237
|
-
*
|
|
241
|
+
*
|
|
242
|
+
* @platform android
|
|
243
|
+
*
|
|
244
|
+
* @param initialUri An optional URI pointing to an initial folder on which the file picker is opened.
|
|
238
245
|
* @param mimeType A mime type that is used to filter out files that can be picked out.
|
|
239
246
|
* @returns a `File` instance.
|
|
247
|
+
* @platform android
|
|
240
248
|
*/
|
|
241
249
|
static pickFileAsync(initialUri?: string, mimeType?: string): Promise<File>;
|
|
242
250
|
|
|
@@ -323,6 +331,7 @@ export type FileInfo = {
|
|
|
323
331
|
export type InfoOptions = {
|
|
324
332
|
/**
|
|
325
333
|
* Whether to return the MD5 hash of the file.
|
|
334
|
+
*
|
|
326
335
|
* @default false
|
|
327
336
|
*/
|
|
328
337
|
md5?: boolean;
|
package/src/FileSystem.ts
CHANGED
|
@@ -57,13 +57,26 @@ export class Paths extends PathUtilities {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Represents a file on the filesystem.
|
|
62
|
+
*
|
|
63
|
+
* A `File` instance can be created for any path, and does not need to exist on the filesystem during creation.
|
|
64
|
+
*
|
|
65
|
+
* The constructor accepts an array of strings that are joined to create the file URI. The first argument can also be a `Directory` instance (like `Paths.cache`) or a `File` instance (which creates a new reference to the same file).
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const file = new File(File.cache, "subdirName", "file.txt");
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
60
71
|
export class File extends ExpoFileSystem.FileSystemFile implements Blob {
|
|
61
72
|
/**
|
|
62
|
-
* Creates an instance of a file.
|
|
63
|
-
*
|
|
73
|
+
* Creates an instance of a file. It can be created for any path, and does not need to exist on the filesystem during creation.
|
|
74
|
+
*
|
|
75
|
+
* The constructor accepts an array of strings that are joined to create the file URI. The first argument can also be a `Directory` instance (like `Paths.cache`) or a `File` instance (which creates a new reference to the same file).
|
|
76
|
+
* @param uris An array of: `file:///` string URIs, `File` instances, and `Directory` instances representing an arbitrary location on the file system.
|
|
64
77
|
* @example
|
|
65
78
|
* ```ts
|
|
66
|
-
* const file = new File("file
|
|
79
|
+
* const file = new File(File.cache, "subdirName", "file.txt");
|
|
67
80
|
* ```
|
|
68
81
|
*/
|
|
69
82
|
constructor(...uris: (string | File | Directory)[]) {
|
|
@@ -134,14 +147,22 @@ File.pickFileAsync = async function (initialUri?: string, mimeType?: string) {
|
|
|
134
147
|
* Represents a directory on the filesystem.
|
|
135
148
|
*
|
|
136
149
|
* A `Directory` instance can be created for any path, and does not need to exist on the filesystem during creation.
|
|
150
|
+
*
|
|
151
|
+
* The constructor accepts an array of strings that are joined to create the directory URI. The first argument can also be a `Directory` instance (like `Paths.cache`).
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* const directory = new Directory(File.cache, "subdirName");
|
|
155
|
+
* ```
|
|
137
156
|
*/
|
|
138
157
|
export class Directory extends ExpoFileSystem.FileSystemDirectory {
|
|
139
158
|
/**
|
|
140
|
-
* Creates an instance of a directory.
|
|
141
|
-
*
|
|
159
|
+
* Creates an instance of a directory. It can be created for any path, and does not need to exist on the filesystem during creation.
|
|
160
|
+
*
|
|
161
|
+
* The constructor accepts an array of strings that are joined to create the directory URI. The first argument can also be a `Directory` instance (like `Paths.cache`).
|
|
162
|
+
* @param uris An array of: `file:///` string URIs, `File` instances, and `Directory` instances representing an arbitrary location on the file system.
|
|
142
163
|
* @example
|
|
143
164
|
* ```ts
|
|
144
|
-
* const directory = new Directory("
|
|
165
|
+
* const directory = new Directory(File.cache, "subdirName");
|
|
145
166
|
* ```
|
|
146
167
|
*/
|
|
147
168
|
constructor(...uris: (string | File | Directory)[]) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
115b0114af05e17995f5bdab07a3ab16
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
733bfd800ab7ebc1d1c82e642b4edead8a901d5f
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
150872c129c64983be7ab2056d944f25320d581de315845c19d76eaa1c0980f7
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
855720b3802de8a9b796433f6d8e05d5c3b456737b0f6f4f629015a5cd04667216e93f6ab85ddd074864405ef689ee5ea446463c9bef1f54d8525123e852d1e0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bd9d6af2053adec1ffb3073e8d903b4b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6d75988f414535c89f497db1cc5582b4c1944204
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
236607b1436c81d824e4ef0676fbabc20af5c3c4fa7fc377ae96635a450a10e8
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
93c9c7905bf9a196739eefc98d7f0722ec9a2be6f237e7ac7413279b3b6e9684cc3e62d386d4490c95e1d752b37be2e911e23974f41d661564ee44226320557f
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|