@capacitor/filesystem 7.0.2-nightly-20250526T150552.0 → 7.1.0-dev.1

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.
Files changed (39) hide show
  1. package/CapacitorFilesystem.podspec +4 -3
  2. package/Package.swift +10 -4
  3. package/README.md +149 -78
  4. package/android/build.gradle +12 -22
  5. package/android/src/main/kotlin/com/capacitorjs/plugins/filesystem/FilesystemErrors.kt +101 -0
  6. package/android/src/main/kotlin/com/capacitorjs/plugins/filesystem/FilesystemMethodOptions.kt +129 -0
  7. package/android/src/main/kotlin/com/capacitorjs/plugins/filesystem/FilesystemMethodResults.kt +65 -0
  8. package/android/src/main/kotlin/com/capacitorjs/plugins/filesystem/FilesystemPlugin.kt +412 -0
  9. package/android/src/main/kotlin/com/capacitorjs/plugins/filesystem/LegacyFilesystemImplementation.kt +169 -0
  10. package/android/src/main/kotlin/com/capacitorjs/plugins/filesystem/PluginResultExtensions.kt +25 -0
  11. package/dist/docs.json +227 -145
  12. package/dist/esm/definitions.d.ts +102 -64
  13. package/dist/esm/definitions.js +25 -3
  14. package/dist/esm/definitions.js.map +1 -1
  15. package/dist/esm/index.js +3 -1
  16. package/dist/esm/index.js.map +1 -1
  17. package/dist/esm/web.d.ts +3 -1
  18. package/dist/esm/web.js +10 -10
  19. package/dist/esm/web.js.map +1 -1
  20. package/dist/plugin.cjs.js +40 -14
  21. package/dist/plugin.cjs.js.map +1 -1
  22. package/dist/plugin.js +41 -16
  23. package/dist/plugin.js.map +1 -1
  24. package/ios/Sources/FilesystemPlugin/CAPPluginCall+Accelerators.swift +73 -0
  25. package/ios/Sources/FilesystemPlugin/FilesystemConstants.swift +61 -0
  26. package/ios/Sources/FilesystemPlugin/FilesystemError.swift +57 -0
  27. package/ios/Sources/FilesystemPlugin/FilesystemLocationResolver.swift +39 -0
  28. package/ios/Sources/FilesystemPlugin/FilesystemOperation.swift +24 -0
  29. package/ios/Sources/FilesystemPlugin/FilesystemOperationExecutor.swift +116 -0
  30. package/ios/Sources/FilesystemPlugin/FilesystemPlugin.swift +103 -264
  31. package/ios/Sources/FilesystemPlugin/IONFileStructures+Converters.swift +60 -0
  32. package/ios/Sources/FilesystemPlugin/{Filesystem.swift → LegacyFilesystemImplementation.swift} +18 -179
  33. package/package.json +28 -24
  34. package/LICENSE +0 -23
  35. package/android/src/main/java/com/capacitorjs/plugins/filesystem/Filesystem.java +0 -414
  36. package/android/src/main/java/com/capacitorjs/plugins/filesystem/FilesystemPlugin.java +0 -551
  37. package/android/src/main/java/com/capacitorjs/plugins/filesystem/exceptions/CopyFailedException.java +0 -16
  38. package/android/src/main/java/com/capacitorjs/plugins/filesystem/exceptions/DirectoryExistsException.java +0 -16
  39. package/android/src/main/java/com/capacitorjs/plugins/filesystem/exceptions/DirectoryNotFoundException.java +0 -16
@@ -0,0 +1,169 @@
1
+ package com.capacitorjs.plugins.filesystem
2
+
3
+ import android.content.Context
4
+ import android.net.Uri
5
+ import android.os.Environment
6
+ import android.os.Handler
7
+ import android.os.Looper
8
+ import com.getcapacitor.Bridge
9
+ import com.getcapacitor.JSObject
10
+ import com.getcapacitor.PluginCall
11
+ import com.getcapacitor.plugin.util.HttpRequestHandler.HttpURLConnectionBuilder
12
+ import com.getcapacitor.plugin.util.HttpRequestHandler.ProgressEmitter
13
+ import org.json.JSONException
14
+ import java.io.File
15
+ import java.io.FileOutputStream
16
+ import java.io.IOException
17
+ import java.net.URISyntaxException
18
+ import java.net.URL
19
+ import kotlin.concurrent.thread
20
+
21
+ class LegacyFilesystemImplementation internal constructor(private val context: Context) {
22
+ fun downloadFile(
23
+ call: PluginCall,
24
+ bridge: Bridge,
25
+ emitter: ProgressEmitter?,
26
+ callback: FilesystemDownloadCallback
27
+ ) {
28
+ val urlString = call.getString("url", "")
29
+ val handler = Handler(Looper.getMainLooper())
30
+
31
+ thread {
32
+ try {
33
+ val result =
34
+ doDownloadInBackground(urlString, call, bridge, emitter)
35
+ handler.post { callback.onSuccess(result) }
36
+ } catch (error: Exception) {
37
+ handler.post { callback.onError(error) }
38
+ }
39
+ }
40
+ }
41
+
42
+ /**
43
+ * True if the given directory string is a public storage directory, which is accessible by the user or other apps.
44
+ * @param directory the directory string.
45
+ */
46
+ fun isPublicDirectory(directory: String?): Boolean {
47
+ return "DOCUMENTS" == directory || "EXTERNAL_STORAGE" == directory
48
+ }
49
+
50
+ private fun getDirectory(directory: String): File? {
51
+ val c = this.context
52
+ when (directory) {
53
+ "DOCUMENTS" -> return Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS)
54
+ "DATA", "LIBRARY" -> return c.filesDir
55
+ "CACHE" -> return c.cacheDir
56
+ "EXTERNAL" -> return c.getExternalFilesDir(null)
57
+ "EXTERNAL_STORAGE" -> return Environment.getExternalStorageDirectory()
58
+ }
59
+ return null
60
+ }
61
+
62
+ private fun getFileObject(path: String, directory: String?): File? {
63
+ if (directory == null) {
64
+ val u = Uri.parse(path)
65
+ if (u.scheme == null || u.scheme == "file") {
66
+ return File(u.path)
67
+ }
68
+ }
69
+
70
+ val androidDirectory = this.getDirectory(directory!!)
71
+
72
+ if (androidDirectory == null) {
73
+ return null
74
+ } else {
75
+ if (!androidDirectory.exists()) {
76
+ androidDirectory.mkdir()
77
+ }
78
+ }
79
+
80
+ return File(androidDirectory, path)
81
+ }
82
+
83
+ @Throws(IOException::class, URISyntaxException::class, JSONException::class)
84
+ private fun doDownloadInBackground(
85
+ urlString: String?,
86
+ call: PluginCall,
87
+ bridge: Bridge,
88
+ emitter: ProgressEmitter?
89
+ ): JSObject {
90
+ val headers = call.getObject("headers", JSObject())
91
+ val params = call.getObject("params", JSObject())
92
+ val connectTimeout = call.getInt("connectTimeout")
93
+ val readTimeout = call.getInt("readTimeout")
94
+ val disableRedirects = call.getBoolean("disableRedirects") ?: false
95
+ val shouldEncode = call.getBoolean("shouldEncodeUrlParams") ?: true
96
+ val progress = call.getBoolean("progress") ?: false
97
+
98
+ val method = call.getString("method")?.uppercase() ?: "GET"
99
+ val path = call.getString("path")!!
100
+ val directory = call.getString("directory", Environment.DIRECTORY_DOWNLOADS)
101
+
102
+ val url = URL(urlString)
103
+ val file = getFileObject(path, directory)
104
+
105
+ val connectionBuilder = HttpURLConnectionBuilder()
106
+ .setUrl(url)
107
+ .setMethod(method)
108
+ .setHeaders(headers)
109
+ .setUrlParams(params, shouldEncode)
110
+ .setConnectTimeout(connectTimeout)
111
+ .setReadTimeout(readTimeout)
112
+ .setDisableRedirects(disableRedirects)
113
+ .openConnection()
114
+
115
+ val connection = connectionBuilder.build()
116
+
117
+ connection.setSSLSocketFactory(bridge)
118
+
119
+ val connectionInputStream = connection.inputStream
120
+ val fileOutputStream = FileOutputStream(file, false)
121
+
122
+ val contentLength = connection.getHeaderField("content-length")
123
+ var bytes = 0
124
+ var maxBytes = 0
125
+
126
+ try {
127
+ maxBytes = contentLength?.toInt() ?: 0
128
+ } catch (ignored: NumberFormatException) {
129
+ }
130
+
131
+ val buffer = ByteArray(1024)
132
+ var len: Int
133
+
134
+ // Throttle emitter to 100ms so it doesn't slow down app
135
+ var lastEmitTime = System.currentTimeMillis()
136
+ val minEmitIntervalMillis: Long = 100
137
+
138
+ while ((connectionInputStream.read(buffer).also { len = it }) > 0) {
139
+ fileOutputStream.write(buffer, 0, len)
140
+
141
+ bytes += len
142
+
143
+ if (progress!! && null != emitter) {
144
+ val currentTime = System.currentTimeMillis()
145
+ if (currentTime - lastEmitTime > minEmitIntervalMillis) {
146
+ emitter.emit(bytes, maxBytes)
147
+ lastEmitTime = currentTime
148
+ }
149
+ }
150
+ }
151
+
152
+ if (progress!! && null != emitter) {
153
+ emitter.emit(bytes, maxBytes)
154
+ }
155
+
156
+ connectionInputStream.close()
157
+ fileOutputStream.close()
158
+
159
+ val ret = JSObject()
160
+ ret.put("path", file!!.absolutePath)
161
+ return ret
162
+ }
163
+
164
+ interface FilesystemDownloadCallback {
165
+ fun onSuccess(result: JSObject)
166
+
167
+ fun onError(error: Exception)
168
+ }
169
+ }
@@ -0,0 +1,25 @@
1
+ package com.capacitorjs.plugins.filesystem
2
+
3
+ import com.getcapacitor.JSObject
4
+ import com.getcapacitor.PluginCall
5
+
6
+ /**
7
+ * Extension function to return a successful plugin result
8
+ * @param result JSOObject with the JSON content to return
9
+ * @param keepCallback boolean to determine if callback should be kept for future calls or not
10
+ */
11
+ internal fun PluginCall.sendSuccess(result: JSObject? = null, keepCallback: Boolean = false) {
12
+ this.setKeepAlive(keepCallback)
13
+ if (result != null) {
14
+ this.resolve(result)
15
+ } else {
16
+ this.resolve()
17
+ }
18
+ }
19
+
20
+ /**
21
+ * Extension function to return a unsuccessful plugin result
22
+ * @param error error class representing the error to return, containing a code and message
23
+ */
24
+ internal fun PluginCall.sendError(error: FilesystemErrors.ErrorInfo) =
25
+ this.reject(error.message, error.code)
package/dist/docs.json CHANGED
@@ -5,6 +5,40 @@
5
5
  "docs": "",
6
6
  "tags": [],
7
7
  "methods": [
8
+ {
9
+ "name": "checkPermissions",
10
+ "signature": "() => Promise<PermissionStatus>",
11
+ "parameters": [],
12
+ "returns": "Promise<PermissionStatus>",
13
+ "tags": [
14
+ {
15
+ "name": "since",
16
+ "text": "1.0.0"
17
+ }
18
+ ],
19
+ "docs": "Check read/write permissions.\nRequired on Android, only when using `Directory.Documents` or\n`Directory.ExternalStorage`.",
20
+ "complexTypes": [
21
+ "PermissionStatus"
22
+ ],
23
+ "slug": "checkpermissions"
24
+ },
25
+ {
26
+ "name": "requestPermissions",
27
+ "signature": "() => Promise<PermissionStatus>",
28
+ "parameters": [],
29
+ "returns": "Promise<PermissionStatus>",
30
+ "tags": [
31
+ {
32
+ "name": "since",
33
+ "text": "1.0.0"
34
+ }
35
+ ],
36
+ "docs": "Request read/write permissions.\nRequired on Android, only when using `Directory.Documents` or\n`Directory.ExternalStorage`.",
37
+ "complexTypes": [
38
+ "PermissionStatus"
39
+ ],
40
+ "slug": "requestpermissions"
41
+ },
8
42
  {
9
43
  "name": "readFile",
10
44
  "signature": "(options: ReadFileOptions) => Promise<ReadFileResult>",
@@ -29,6 +63,36 @@
29
63
  ],
30
64
  "slug": "readfile"
31
65
  },
66
+ {
67
+ "name": "readFileInChunks",
68
+ "signature": "(options: ReadFileInChunksOptions, callback: ReadFileInChunksCallback) => Promise<CallbackID>",
69
+ "parameters": [
70
+ {
71
+ "name": "options",
72
+ "docs": "",
73
+ "type": "ReadFileInChunksOptions"
74
+ },
75
+ {
76
+ "name": "callback",
77
+ "docs": "",
78
+ "type": "ReadFileInChunksCallback"
79
+ }
80
+ ],
81
+ "returns": "Promise<string>",
82
+ "tags": [
83
+ {
84
+ "name": "since",
85
+ "text": "7.1.0"
86
+ }
87
+ ],
88
+ "docs": "Read a file from disk, in chunks.\nNative only (not available in web).\nUse the callback to receive each read chunk.\nIf empty chunk is returned, it means file has been completely read.",
89
+ "complexTypes": [
90
+ "ReadFileInChunksOptions",
91
+ "ReadFileInChunksCallback",
92
+ "CallbackID"
93
+ ],
94
+ "slug": "readfileinchunks"
95
+ },
32
96
  {
33
97
  "name": "writeFile",
34
98
  "signature": "(options: WriteFileOptions) => Promise<WriteFileResult>",
@@ -203,7 +267,7 @@
203
267
  "type": "StatOptions"
204
268
  }
205
269
  ],
206
- "returns": "Promise<StatResult>",
270
+ "returns": "Promise<FileInfo>",
207
271
  "tags": [
208
272
  {
209
273
  "name": "since",
@@ -212,8 +276,9 @@
212
276
  ],
213
277
  "docs": "Return data about a file",
214
278
  "complexTypes": [
215
- "StatResult",
216
- "StatOptions"
279
+ "FileInfo",
280
+ "StatOptions",
281
+ "StatResult"
217
282
  ],
218
283
  "slug": "stat"
219
284
  },
@@ -264,40 +329,6 @@
264
329
  ],
265
330
  "slug": "copy"
266
331
  },
267
- {
268
- "name": "checkPermissions",
269
- "signature": "() => Promise<PermissionStatus>",
270
- "parameters": [],
271
- "returns": "Promise<PermissionStatus>",
272
- "tags": [
273
- {
274
- "name": "since",
275
- "text": "1.0.0"
276
- }
277
- ],
278
- "docs": "Check read/write permissions.\nRequired on Android, only when using `Directory.Documents` or\n`Directory.ExternalStorage`.",
279
- "complexTypes": [
280
- "PermissionStatus"
281
- ],
282
- "slug": "checkpermissions"
283
- },
284
- {
285
- "name": "requestPermissions",
286
- "signature": "() => Promise<PermissionStatus>",
287
- "parameters": [],
288
- "returns": "Promise<PermissionStatus>",
289
- "tags": [
290
- {
291
- "name": "since",
292
- "text": "1.0.0"
293
- }
294
- ],
295
- "docs": "Request read/write permissions.\nRequired on Android, only when using `Directory.Documents` or\n`Directory.ExternalStorage`.",
296
- "complexTypes": [
297
- "PermissionStatus"
298
- ],
299
- "slug": "requestpermissions"
300
- },
301
332
  {
302
333
  "name": "downloadFile",
303
334
  "signature": "(options: DownloadFileOptions) => Promise<DownloadFileResult>",
@@ -313,9 +344,17 @@
313
344
  {
314
345
  "name": "since",
315
346
  "text": "5.1.0"
347
+ },
348
+ {
349
+ "name": "deprecated",
350
+ "text": "Use the"
351
+ },
352
+ {
353
+ "name": "capacitor",
354
+ "text": "/file-transfer plugin instead."
316
355
  }
317
356
  ],
318
- "docs": "Perform a http request to a server and download the file to the specified destination.",
357
+ "docs": "Perform a http request to a server and download the file to the specified destination.\n\nThis method has been deprecated since version 7.1.0.\nWe recommend using the @capacitor/file-transfer plugin instead, in conjunction with this plugin.",
319
358
  "complexTypes": [
320
359
  "DownloadFileResult",
321
360
  "DownloadFileOptions"
@@ -342,9 +381,17 @@
342
381
  {
343
382
  "name": "since",
344
383
  "text": "5.1.0"
384
+ },
385
+ {
386
+ "name": "deprecated",
387
+ "text": "Use the"
388
+ },
389
+ {
390
+ "name": "capacitor",
391
+ "text": "/file-transfer plugin instead."
345
392
  }
346
393
  ],
347
- "docs": "Add a listener to file download progress events.",
394
+ "docs": "Add a listener to file download progress events.\n\nThis method has been deprecated since version 7.1.0.\nWe recommend using the @capacitor/file-transfer plugin instead, in conjunction with this plugin.",
348
395
  "complexTypes": [
349
396
  "PluginListenerHandle",
350
397
  "ProgressListener"
@@ -360,9 +407,17 @@
360
407
  {
361
408
  "name": "since",
362
409
  "text": "5.2.0"
410
+ },
411
+ {
412
+ "name": "deprecated",
413
+ "text": "Use the"
414
+ },
415
+ {
416
+ "name": "capacitor",
417
+ "text": "/file-transfer plugin instead."
363
418
  }
364
419
  ],
365
- "docs": "Remove all listeners for this plugin.",
420
+ "docs": "Remove all listeners for this plugin.\n\nThis method has been deprecated since version 7.1.0.\nWe recommend using the @capacitor/file-transfer plugin instead, in conjunction with this plugin.",
366
421
  "complexTypes": [],
367
422
  "slug": "removealllisteners"
368
423
  }
@@ -370,6 +425,24 @@
370
425
  "properties": []
371
426
  },
372
427
  "interfaces": [
428
+ {
429
+ "name": "PermissionStatus",
430
+ "slug": "permissionstatus",
431
+ "docs": "",
432
+ "tags": [],
433
+ "methods": [],
434
+ "properties": [
435
+ {
436
+ "name": "publicStorage",
437
+ "tags": [],
438
+ "docs": "",
439
+ "complexTypes": [
440
+ "PermissionState"
441
+ ],
442
+ "type": "PermissionState"
443
+ }
444
+ ]
445
+ },
373
446
  {
374
447
  "name": "ReadFileResult",
375
448
  "slug": "readfileresult",
@@ -442,6 +515,27 @@
442
515
  }
443
516
  ]
444
517
  },
518
+ {
519
+ "name": "ReadFileInChunksOptions",
520
+ "slug": "readfileinchunksoptions",
521
+ "docs": "",
522
+ "tags": [],
523
+ "methods": [],
524
+ "properties": [
525
+ {
526
+ "name": "chunkSize",
527
+ "tags": [
528
+ {
529
+ "text": "7.1.0",
530
+ "name": "since"
531
+ }
532
+ ],
533
+ "docs": "Size of the chunks in bytes.",
534
+ "complexTypes": [],
535
+ "type": "number"
536
+ }
537
+ ]
538
+ },
445
539
  {
446
540
  "name": "WriteFileResult",
447
541
  "slug": "writefileresult",
@@ -772,7 +866,12 @@
772
866
  "properties": [
773
867
  {
774
868
  "name": "name",
775
- "tags": [],
869
+ "tags": [
870
+ {
871
+ "text": "7.1.0",
872
+ "name": "since"
873
+ }
874
+ ],
776
875
  "docs": "Name of the file or directory.",
777
876
  "complexTypes": [],
778
877
  "type": "string"
@@ -805,7 +904,7 @@
805
904
  "name": "ctime",
806
905
  "tags": [
807
906
  {
808
- "text": "4.0.0",
907
+ "text": "7.1.0",
809
908
  "name": "since"
810
909
  }
811
910
  ],
@@ -817,7 +916,7 @@
817
916
  "name": "mtime",
818
917
  "tags": [
819
918
  {
820
- "text": "4.0.0",
919
+ "text": "7.1.0",
821
920
  "name": "since"
822
921
  }
823
922
  ],
@@ -930,75 +1029,6 @@
930
1029
  }
931
1030
  ]
932
1031
  },
933
- {
934
- "name": "StatResult",
935
- "slug": "statresult",
936
- "docs": "",
937
- "tags": [],
938
- "methods": [],
939
- "properties": [
940
- {
941
- "name": "type",
942
- "tags": [
943
- {
944
- "text": "1.0.0",
945
- "name": "since"
946
- }
947
- ],
948
- "docs": "Type of the file.",
949
- "complexTypes": [],
950
- "type": "'file' | 'directory'"
951
- },
952
- {
953
- "name": "size",
954
- "tags": [
955
- {
956
- "text": "1.0.0",
957
- "name": "since"
958
- }
959
- ],
960
- "docs": "Size of the file in bytes.",
961
- "complexTypes": [],
962
- "type": "number"
963
- },
964
- {
965
- "name": "ctime",
966
- "tags": [
967
- {
968
- "text": "1.0.0",
969
- "name": "since"
970
- }
971
- ],
972
- "docs": "Time of creation in milliseconds.\n\nIt's not available on Android 7 and older devices.",
973
- "complexTypes": [],
974
- "type": "number | undefined"
975
- },
976
- {
977
- "name": "mtime",
978
- "tags": [
979
- {
980
- "text": "1.0.0",
981
- "name": "since"
982
- }
983
- ],
984
- "docs": "Time of last modification in milliseconds.",
985
- "complexTypes": [],
986
- "type": "number"
987
- },
988
- {
989
- "name": "uri",
990
- "tags": [
991
- {
992
- "text": "1.0.0",
993
- "name": "since"
994
- }
995
- ],
996
- "docs": "The uri of the file",
997
- "complexTypes": [],
998
- "type": "string"
999
- }
1000
- ]
1001
- },
1002
1032
  {
1003
1033
  "name": "StatOptions",
1004
1034
  "slug": "statoptions",
@@ -1116,24 +1146,6 @@
1116
1146
  }
1117
1147
  ]
1118
1148
  },
1119
- {
1120
- "name": "PermissionStatus",
1121
- "slug": "permissionstatus",
1122
- "docs": "",
1123
- "tags": [],
1124
- "methods": [],
1125
- "properties": [
1126
- {
1127
- "name": "publicStorage",
1128
- "tags": [],
1129
- "docs": "",
1130
- "complexTypes": [
1131
- "PermissionState"
1132
- ],
1133
- "type": "PermissionState"
1134
- }
1135
- ]
1136
- },
1137
1149
  {
1138
1150
  "name": "DownloadFileResult",
1139
1151
  "slug": "downloadfileresult",
@@ -1308,7 +1320,7 @@
1308
1320
  "name": "since"
1309
1321
  }
1310
1322
  ],
1311
- "docs": "The Documents directory.\nOn iOS it's the app's documents directory.\nUse this directory to store user-generated content.\nOn Android it's the Public Documents folder, so it's accessible from other apps.\nIt's not accesible on Android 10 unless the app enables legacy External Storage\nby adding `android:requestLegacyExternalStorage=\"true\"` in the `application` tag\nin the `AndroidManifest.xml`.\nOn Android 11 or newer the app can only access the files/folders the app created."
1323
+ "docs": "The Documents directory.\nOn iOS it's the app's documents directory.\nUse this directory to store user-generated content.\nOn Android it's the Public Documents folder, so it's accessible from other apps.\nIt's not accessible on Android 10 unless the app enables legacy External Storage\nby adding `android:requestLegacyExternalStorage=\"true\"` in the `application` tag\nin the `AndroidManifest.xml`.\nOn Android 11 or newer the app can only access the files/folders the app created."
1312
1324
  },
1313
1325
  {
1314
1326
  "name": "Data",
@@ -1363,7 +1375,40 @@
1363
1375
  "name": "since"
1364
1376
  }
1365
1377
  ],
1366
- "docs": "The external storage directory.\nOn iOS it will use the Documents directory.\nOn Android it's the primary shared/external storage directory.\nIt's not accesible on Android 10 unless the app enables legacy External Storage\nby adding `android:requestLegacyExternalStorage=\"true\"` in the `application` tag\nin the `AndroidManifest.xml`.\nIt's not accesible on Android 11 or newer."
1378
+ "docs": "The external storage directory.\nOn iOS it will use the Documents directory.\nOn Android it's the primary shared/external storage directory.\nIt's not accessible on Android 10 unless the app enables legacy External Storage\nby adding `android:requestLegacyExternalStorage=\"true\"` in the `application` tag\nin the `AndroidManifest.xml`.\nIt's not accessible on Android 11 or newer."
1379
+ },
1380
+ {
1381
+ "name": "ExternalCache",
1382
+ "value": "'EXTERNAL_CACHE'",
1383
+ "tags": [
1384
+ {
1385
+ "text": "7.1.0",
1386
+ "name": "since"
1387
+ }
1388
+ ],
1389
+ "docs": "The external cache directory.\nOn iOS it will use the Documents directory.\nOn Android it's the primary shared/external cache."
1390
+ },
1391
+ {
1392
+ "name": "LibraryNoCloud",
1393
+ "value": "'LIBRARY_NO_CLOUD'",
1394
+ "tags": [
1395
+ {
1396
+ "text": "7.1.0",
1397
+ "name": "since"
1398
+ }
1399
+ ],
1400
+ "docs": "The Library directory without cloud backup. Used in iOS.\nOn Android it's the directory holding application files."
1401
+ },
1402
+ {
1403
+ "name": "Temporary",
1404
+ "value": "'TEMPORARY'",
1405
+ "tags": [
1406
+ {
1407
+ "text": "7.1.0",
1408
+ "name": "since"
1409
+ }
1410
+ ],
1411
+ "docs": "A temporary directory for iOS.\nOn Android it's the directory holding the application cache."
1367
1412
  }
1368
1413
  ]
1369
1414
  },
@@ -1408,19 +1453,6 @@
1408
1453
  }
1409
1454
  ],
1410
1455
  "typeAliases": [
1411
- {
1412
- "name": "RenameOptions",
1413
- "slug": "renameoptions",
1414
- "docs": "",
1415
- "types": [
1416
- {
1417
- "text": "CopyOptions",
1418
- "complexTypes": [
1419
- "CopyOptions"
1420
- ]
1421
- }
1422
- ]
1423
- },
1424
1456
  {
1425
1457
  "name": "PermissionState",
1426
1458
  "slug": "permissionstate",
@@ -1444,6 +1476,56 @@
1444
1476
  }
1445
1477
  ]
1446
1478
  },
1479
+ {
1480
+ "name": "ReadFileInChunksCallback",
1481
+ "slug": "readfileinchunkscallback",
1482
+ "docs": "Callback for receiving chunks read from a file, or error if something went wrong.",
1483
+ "types": [
1484
+ {
1485
+ "text": "(chunkRead: ReadFileResult | null, err?: any): void",
1486
+ "complexTypes": [
1487
+ "ReadFileResult"
1488
+ ]
1489
+ }
1490
+ ]
1491
+ },
1492
+ {
1493
+ "name": "CallbackID",
1494
+ "slug": "callbackid",
1495
+ "docs": "",
1496
+ "types": [
1497
+ {
1498
+ "text": "string",
1499
+ "complexTypes": []
1500
+ }
1501
+ ]
1502
+ },
1503
+ {
1504
+ "name": "StatResult",
1505
+ "slug": "statresult",
1506
+ "docs": "",
1507
+ "types": [
1508
+ {
1509
+ "text": "FileInfo",
1510
+ "complexTypes": [
1511
+ "FileInfo"
1512
+ ]
1513
+ }
1514
+ ]
1515
+ },
1516
+ {
1517
+ "name": "RenameOptions",
1518
+ "slug": "renameoptions",
1519
+ "docs": "",
1520
+ "types": [
1521
+ {
1522
+ "text": "CopyOptions",
1523
+ "complexTypes": [
1524
+ "CopyOptions"
1525
+ ]
1526
+ }
1527
+ ]
1528
+ },
1447
1529
  {
1448
1530
  "name": "ProgressListener",
1449
1531
  "slug": "progresslistener",