Skip to content

Commit ca797e8

Browse files
committed
2 parents d8097d5 + 265a932 commit ca797e8

40 files changed

+3122
-3283
lines changed

.asf.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,32 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
github:
19+
description: Apache Cordova File Plugin
20+
homepage: https://cordova.apache.org/
21+
22+
labels:
23+
- android
24+
- cordova
25+
- hacktoberfest
26+
- ios
27+
- java
28+
- javascript
29+
- library
30+
- mobile
31+
- nodejs
32+
- objective-c
33+
34+
features:
35+
wiki: false
36+
issues: true
37+
projects: true
38+
39+
enabled_merge_buttons:
40+
squash: true
41+
merge: false
42+
rebase: false
43+
1844
notifications:
1945
2046

.github/workflows/android.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ jobs:
5757
matrix:
5858
versions:
5959
# Test the lowest minimum supported APIs
60-
- android: 5.1
61-
android-api: 22
60+
- android: 7
61+
android-api: 24
6262

6363
# Test the last 3-4 supported APIs
6464
- android: 10
@@ -67,12 +67,12 @@ jobs:
6767
- android: 11
6868
android-api: 30
6969

70-
- android: 12
71-
android-api: 31
72-
7370
- android: 12L
7471
android-api: 32
7572

73+
- android: 13
74+
android-api: 33
75+
7676
timeout-minutes: 60
7777

7878
steps:
@@ -105,7 +105,7 @@ jobs:
105105
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
106106
run: npm i -g github:apache/cordova-paramedic
107107

108-
- uses: reactivecircus/android-emulator-runner@5de26e4bd23bf523e8a4b7f077df8bfb8e52b50e
108+
- uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b
109109
env:
110110
system-image-arch: ${{ matrix.versions.system-image-arch == '' && env.default_system-image-arch || matrix.versions.system-image-arch }}
111111
system-image-target: ${{ matrix.versions.system-image-target == '' && env.default_system-image-target || matrix.versions.system-image-target }}
@@ -119,7 +119,7 @@ jobs:
119119
script: echo "Pregenerate the AVD before running Paramedic"
120120

121121
- name: Run paramedic tests
122-
uses: reactivecircus/android-emulator-runner@5de26e4bd23bf523e8a4b7f077df8bfb8e52b50e
122+
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b
123123
env:
124124
system-image-arch: ${{ matrix.versions.system-image-arch == '' && env.default_system-image-arch || matrix.versions.system-image-arch }}
125125
system-image-target: ${{ matrix.versions.system-image-target == '' && env.default_system-image-target || matrix.versions.system-image-target }}

.github/workflows/chrome.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
node-version: 16
4343

4444
steps:
45-
- uses: actions/checkout@v2
46-
- uses: actions/setup-node@v2
45+
- uses: actions/checkout@v3
46+
- uses: actions/setup-node@v3
4747
with:
4848
node-version: ${{ env.node-version }}
4949

@@ -61,7 +61,7 @@ jobs:
6161
npm ci
6262
6363
- name: Run paramedic install
64-
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
64+
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
6565
run: npm i -g github:apache/cordova-paramedic
6666

6767
- name: Run paramedic tests

.github/workflows/ios.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,16 @@ jobs:
6262
ios-version: 15.x
6363
xcode-version: 13.x
6464

65+
- os-version: macos-12
66+
ios-version: 16.x
67+
xcode-version: 14.x
68+
6569
steps:
66-
- uses: actions/checkout@v2
67-
- uses: actions/setup-node@v2
70+
- uses: actions/checkout@v3
71+
- uses: actions/setup-node@v3
6872
with:
6973
node-version: ${{ env.node-version }}
70-
- uses: maxim-lobanov/setup-xcode@881be567d30efed8fb3f12b5099d68c3fb72aa3d
74+
- uses: maxim-lobanov/setup-xcode@9a697e2b393340c3cacd97468baa318e4c883d98
7175
env:
7276
xcode-version: ${{ matrix.versions.xcode-version == '' && env.default_xcode-version || matrix.versions.xcode-version }}
7377
with:

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
node-version: 16
3838

3939
steps:
40-
- uses: actions/checkout@v2
41-
- uses: actions/setup-node@v2
40+
- uses: actions/checkout@v3
41+
- uses: actions/setup-node@v3
4242
with:
4343
node-version: ${{ env.node-version }}
4444

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ Each URL is in the form _file:///path/to/spot/_, and can be converted to a
9696
in here. (_iOS_, _Android_, _BlackBerry 10_, _OSX_, _windows_)
9797

9898
* `cordova.file.externalApplicationStorageDirectory` - Application space on
99-
external storage. (_Android_)
99+
external storage. (_Android_). See [Quirks](#androids-external-storage-quirks).
100100

101101
* `cordova.file.externalDataDirectory` - Where to put app-specific data files on
102-
external storage. (_Android_)
102+
external storage. (_Android_). See [Quirks](#androids-external-storage-quirks).
103103

104104
* `cordova.file.externalCacheDirectory` - Application cache on external storage.
105-
(_Android_)
105+
(_Android_). See [Quirks](#androids-external-storage-quirks).
106106

107-
* `cordova.file.externalRootDirectory` - External storage (SD card) root. (_Android_, _BlackBerry 10_)
107+
* `cordova.file.externalRootDirectory` - External storage (SD card) root. (_Android_, _BlackBerry 10_). See [Quirks](#androids-external-storage-quirks).
108108

109109
* `cordova.file.tempDirectory` - Temp directory that the OS can clear at will. Do not
110110
rely on the OS to clear this directory; your app should always remove files as
@@ -179,6 +179,26 @@ the `cordova.file.*` properties map to physical paths on a real device.
179179
**Note**: If external storage can't be mounted, the `cordova.file.external*`
180180
properties are `null`.
181181

182+
#### Android's External Storage Quirks
183+
184+
With the introduction of [Scoped Storage](https://source.android.com/docs/core/storage/scoped) access to External Storage is unreliable or limited via File APIs.
185+
Scoped Storage was introduced in API 29. While existing apps may have the ability to opt out, this option is not available for new apps. On Android API 30 and later, Scoped Storage is fully enforced.
186+
187+
Additionally, Direct File Access **is not** supported on API 29. This means this plugin **cannot** access external storage mediums on API 29 devices.
188+
189+
API 30 introduced [FUSE](https://source.android.com/docs/core/storage/scoped) which allowed limited access to external storage using File APIs, allowing this plugin to
190+
partially work again.
191+
192+
Limited access includes but isn't limited to:
193+
- Read only access with appropriate `READ_EXTERNAL` or [READ_MEDIA_*](https://developer.android.com/training/data-storage/shared/media#access-other-apps-files) permissions.
194+
- Read only access is limited to media files, but not documents.
195+
- Writes are limited to only files owned by your app. Modifying files owned by a third-party app (including an image file created via the camera plugin for example) is not possible via the File API.
196+
- Not all paths in external storage is writable.
197+
198+
These limitations only applies to external filesystems (e.g. `cordova.file.external*` paths). Internal filesystems such as `cordova.file.dataDirectory` path are not imposed by these limitations.
199+
200+
If interfacing with the external file system is a requirement for your application, consider using a [MediaStore](https://www.npmjs.com/search?q=ecosystem%3Acordova%20storage%20access%20framework) plugin instead.
201+
182202
### OS X File System Layout
183203

184204
| Device Path | `cordova.file.*` | `iosExtraFileSystems` | r/w? | OS clears | private |

RELEASENOTES.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,32 @@
2020
-->
2121
# Release Notes
2222

23+
### 8.0.1 (Oct 27, 2023)
24+
25+
**Fixes:**
26+
27+
* [GH-608](https://github.com/apache/cordova-plugin-file/pull/608) fix(android): `hasWritePermission` for SDK 33
28+
29+
**Others:**
30+
31+
* [GH-609](https://github.com/apache/cordova-plugin-file/pull/609) chore: update asf config
32+
* [GH-607](https://github.com/apache/cordova-plugin-file/pull/607) refactor(android): various cleanup
33+
* [GH-593](https://github.com/apache/cordova-plugin-file/pull/593) doc(android): expanded on external filesystems limitations
34+
35+
### 8.0.0 (Jul 07, 2023)
36+
37+
* [GH-534](https://github.com/apache/cordova-plugin-file/pull/534) fix(android): `FileError` on a content `resolveLocalFileSystemURL`
38+
* [GH-566](https://github.com/apache/cordova-plugin-file/pull/566) feat(android): add `READ_MEDIA_*` permissions for Android 13+
39+
* [GH-576](https://github.com/apache/cordova-plugin-file/pull/576) feat(android)!: bump `cordova-android@12` requirement
40+
* [GH-575](https://github.com/apache/cordova-plugin-file/pull/575) ci: sync github workflow with paramedic base configs
41+
* [GH-574](https://github.com/apache/cordova-plugin-file/pull/574) chore: update `@cordova/[email protected]` w/ fixes
42+
* [GH-556](https://github.com/apache/cordova-plugin-file/pull/556) feat(android)!: remove `WRITE_EXTERNAL_STORAGE` permission from `plugin.xml`
43+
* [GH-554](https://github.com/apache/cordova-plugin-file/pull/554) spec(android): fix spec based on testing environment
44+
* [GH-547](https://github.com/apache/cordova-plugin-file/pull/547) fix(types): Mark `FileWriter.write` to support `ArrayBuffer` data
45+
* [GH-535](https://github.com/apache/cordova-plugin-file/pull/535) ci: sync workflow with paramedic
46+
* [GH-531](https://github.com/apache/cordova-plugin-file/pull/531) dep(npm): bump package-lock v2 w/ rebuild
47+
* [GH-529](https://github.com/apache/cordova-plugin-file/pull/529) ci(android): update java requirement for `cordova-android@11`
48+
2349
### 7.0.0 (Apr 08, 2022)
2450

2551
* [GH-520](https://github.com/apache/cordova-plugin-file/pull/520) test(android): disable `content` scheme tests

0 commit comments

Comments
 (0)