Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
2c0af01
(#11) Add `listFilesAsStream` to fix large data set gaps
Dec 12, 2021
b7a1a12
(#11) Refactor `SAF` API code to split into modules
Dec 13, 2021
95714cd
(#10, #11) Add support to query `DocumentFile` thumbnails using `Docu…
Dec 13, 2021
1808c2c
(#10, #11) Apply code improvements and implement new `Environment` APIs
Dec 14, 2021
ec51ab2
(#10, #11) Start refactoring API level handling
Dec 28, 2021
9915830
(#10, #11) Add missing `RequiresApi` notations
Dec 28, 2021
c219a9e
(#10, #11) Add missing API level constants to improve readability
Dec 28, 2021
c4de37e
(#10, #11) Add minor code improvements
Dec 29, 2021
fd55674
(#10, #11) Add `getDocumentContent` and `copy` API on native side
Dec 29, 2021
69ddbfd
(#10, #11) Enable the `SAF` API to copy files
Dec 29, 2021
bb2748f
(#10, #11) Fix `async initState` override
Dec 29, 2021
6cce130
(#10, #11) Remove the package `git` example
Jan 7, 2022
9a89cb4
(#10, #11) Add base to read data given `uri`
Jan 8, 2022
3de4439
Return null when the user doesn't select a folder
daentech Feb 1, 2022
937e2f7
Merge pull request #14 from daentech/master
Feb 1, 2022
5ad2682
(#12) Update docs links
Feb 28, 2022
f4a19c3
solves #16
aplicatii-romanesti Apr 2, 2022
1e80977
Merge pull request #17 from aplicatii-romanesti/master
Apr 2, 2022
1234279
Create CODE_OF_CONDUCT.md
Apr 2, 2022
b8ae5ae
(#18) Migrate Dart SDK to `>= 2.16` and use `lint`
Apr 2, 2022
50aa250
Merge branch 'master' of https://github.com/LaksCastro/shared-storage
Apr 2, 2022
f82feaa
(#18) Remove typo
Apr 2, 2022
5c4be31
Update issue templates
Apr 3, 2022
4df4532
Update issue templates
Apr 3, 2022
8fdec6d
(#12) Add docs header
Apr 3, 2022
e1376bf
(#12) Expand `SAF` sample and add `delete` support
Apr 4, 2022
113ba1f
Merge branch 'master' of https://github.com/LaksCastro/shared-storage
Apr 4, 2022
c8923bd
(#12) Fix null-pointer platform arg
Apr 4, 2022
fe9506a
(#12) Remove commented code
Apr 4, 2022
e295b0f
(#12) Remove unused statements
Apr 4, 2022
3c2e112
Update README.md
Apr 5, 2022
cc07a5d
Create secretvault.yml
Apr 21, 2022
5359ff8
(#22, #20, #19, #15) Add `SAF` related features
Apr 24, 2022
4e1c047
Merge branch 'v0.3.0' of https://github.com/LaksCastro/shared-storage…
Apr 24, 2022
6392e48
(#19) Start support for `ACTION_VIEW` intent for any `DocumentFile`
Apr 25, 2022
bf59e7c
Merge branch 'master' of https://github.com/LaksCastro/shared-storage…
Apr 25, 2022
fc37143
(#19) Remove `Log.d` debug
Apr 30, 2022
e4fb0e2
(#22) Fix indent and File Provider declaration
May 8, 2022
b4df8c8
(#22) Remove `SimpleStorage` library since its not v0.3.0 target feature
May 8, 2022
d7d8f4e
(#22) Remove `SimpleStorage` method channel reference
May 8, 2022
3610492
(#22) Remove incompatible dependency
May 8, 2022
fb1ed4b
(#19) Minor code style fix
May 8, 2022
b9b819e
(#12) Move docs from `README.md` to Wiki
May 8, 2022
04fe9a4
(#12) Improve the docs
May 8, 2022
efb627f
(#12) Improve the docs
May 8, 2022
ce29d56
Merge branch 'v0.3.0' of https://github.com/LaksCastro/shared-storage…
May 8, 2022
ba41486
(#12) Add contributors section @all-contributors
May 8, 2022
72a2412
(#12) Add @all-contributors comment marker
May 8, 2022
4349421
(#12) Add `contributors` section
May 8, 2022
dfc40ba
(#9) Trying to use raw credentials file as auth
May 9, 2022
826c4be
(#9) Use `actions-flutter-pub-publisher@v1.3.1`
May 9, 2022
f2d4e24
(#12) Remove `simplestorage` Dart side code
May 9, 2022
8a34d0d
Merge branch 'v0.3.0' of https://github.com/LaksCastro/shared-storage…
May 9, 2022
6bf2d5b
(#12) Remove unused `FileProvider`
May 13, 2022
b8a45b1
Set theme jekyll-theme-cayman
May 13, 2022
2c75f0f
Merge branch 'master' of https://github.com/LaksCastro/shared-storage…
May 13, 2022
9e40e19
Update publish.yaml
May 13, 2022
4c58297
Create my-section.md
May 13, 2022
37e917c
(#12) Add `sync-doc.yaml` to sync documentation files
May 14, 2022
6fe0d71
(#12) Fetch missing `ref`s on action
May 14, 2022
32cc8bb
(#12) Add missing `cp` command arg
May 14, 2022
b661380
(#12) Add anonymous commit author
May 14, 2022
6bc260f
(#12) Add initial docs
May 14, 2022
88991a7
(#12) Move `README` docs to `documentation` branch
May 14, 2022
81abf0a
(#12) Improve installation docs
May 14, 2022
c94bb1d
(#12) Revert and use inline script
May 14, 2022
bca8d7e
(#12) Use logical not instead of `or` op
May 14, 2022
d78c5b7
(#12) Split command to improve actions debugging
May 14, 2022
86c53f7
(#12) Use command groups to avoid exit code 1
May 14, 2022
312a6cd
(#12) Fix typo
May 14, 2022
60a7c35
(#12) Add branches docs on `README.md`
May 14, 2022
6fed3fe
(#12) Add contributors section
May 14, 2022
78bfca9
(#12) Add @all-contributors config file
May 14, 2022
b45d232
(#12) Add initial docs
May 14, 2022
aadba75
(#12) Remove old jekyll files
May 14, 2022
f5fe5b3
Merge pull request #26 from lakscastro/docs/ADD-INITIAL-DOCS
May 14, 2022
de03120
docs: update README.md [skip ci]
allcontributors[bot] May 14, 2022
7f86169
docs: update docs/Getting Started.md [skip ci]
allcontributors[bot] May 14, 2022
1638371
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 14, 2022
38a8911
Merge pull request #28 from lakscastro/all-contributors/add-lakscastro
May 14, 2022
33975d2
docs: update README.md [skip ci]
allcontributors[bot] May 14, 2022
caca029
docs: update docs/Getting Started.md [skip ci]
allcontributors[bot] May 14, 2022
e266a04
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 14, 2022
697fed2
Merge pull request #29 from lakscastro/all-contributors/add-ankitparm…
May 14, 2022
ee9c271
docs: update README.md [skip ci]
allcontributors[bot] May 14, 2022
a733d4f
docs: update docs/Getting Started.md [skip ci]
allcontributors[bot] May 14, 2022
d6add49
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 14, 2022
eec45fd
Merge pull request #30 from lakscastro/all-contributors/add-aplicatii…
May 14, 2022
a6fd0ba
(#12) Add missing `samp` tag
May 14, 2022
6a4a745
Update Getting Started.md
May 14, 2022
4a56358
Merge pull request #31 from lakscastro/docs/PATCH-SYNTAX-HIGHLIGHT
May 14, 2022
761d2d7
docs: update README.md [skip ci]
allcontributors[bot] May 14, 2022
b1a4cf6
docs: update docs/Getting Started.md [skip ci]
allcontributors[bot] May 14, 2022
f8c230b
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 14, 2022
b2a1f08
Merge pull request #32 from lakscastro/all-contributors/add-dangilbert
May 14, 2022
0384981
docs: update README.md [skip ci]
allcontributors[bot] May 14, 2022
e2a116f
docs: update docs/Getting Started.md [skip ci]
allcontributors[bot] May 14, 2022
18f206e
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 14, 2022
3f67bf8
Merge pull request #33 from lakscastro/all-contributors/add-dhaval-k-…
May 14, 2022
f8262be
docs: update README.md [skip ci]
allcontributors[bot] May 14, 2022
a01b962
docs: update docs/Getting Started.md [skip ci]
allcontributors[bot] May 14, 2022
9468fc7
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 14, 2022
cc7c69f
Merge pull request #34 from lakscastro/all-contributors/add-dhaval-k-…
May 14, 2022
368f5b9
Merge branch 'master' of https://github.com/LaksCastro/shared-storage…
May 14, 2022
cc2d6dc
(#12) Add badge version on docs
May 14, 2022
9587cc9
(#12) Target website on `README.md` which is where documentation live…
May 14, 2022
304716e
Merge pull request #35 from lakscastro/docs/UPDATE-README-TO-TARGET-W…
May 14, 2022
9924b54
(#12) Move docs from `Wiki` pages
May 14, 2022
8ea5334
Merge pull request #36 from lakscastro/docs/MOVE-FROM-WIKI
May 14, 2022
82b72aa
Merge branch 'master' of https://github.com/LaksCastro/shared-storage…
May 14, 2022
328da7c
(#12) Remove API subfolders
May 16, 2022
bc2a41f
(#12) Add `mkdocs` workflow
May 16, 2022
25b4e72
(#12) Fix typo
May 16, 2022
6b3ba0d
(#12) Use `mhausenblas/mkdocs-deploy-gh-pages@master`
May 16, 2022
4651915
(#12) Remove unused tasks
May 16, 2022
a1d9da7
(#12) Add link to `pub.dev`
May 16, 2022
f7aa28d
(#38) Add `markdown_extensions` to fix highlight
May 16, 2022
5285cd9
(#38) Fix syntax error
May 16, 2022
30798e9
(#19) Remove `documentation` branch reference
May 17, 2022
bfe963a
(#18) Fix broken `doc` links
May 17, 2022
cbbca7e
(#1) Improve `alias` warning
May 21, 2022
9336196
Merge branch 'master' of https://github.com/LaksCastro/shared-storage…
May 21, 2022
e00112c
(#12) Add `MediaStore` documentation
May 21, 2022
ea3f1cf
(#12) Resolve TODO to build docs only on release
May 21, 2022
2b95054
(#12) Add missing syntax highlighter
May 21, 2022
fd05a2a
(#12) Add `Environment` API docs
May 22, 2022
04613c3
(#12) Fix target checkout branch on action
May 22, 2022
cbcb34e
(#12) Add dynamic `build-docs.yaml` branch
May 22, 2022
0ea566d
(#12) Add `repository_dispatch` trigger
May 22, 2022
5256025
(#12) Change triggers ordering
May 22, 2022
bbdf6bb
(#12) Add `mkdocs` event name
May 22, 2022
899c7cf
(#12) Add `publish` event name
May 22, 2022
e9061dd
(#12) Sync `.github` event triggers with `v0.3.0`
May 22, 2022
a21c4b9
Merge pull request #40 from lakscastro/chore/SYNC-WORKFLOWS
May 22, 2022
ee6030b
(#12) Remove redundant `contributing` option
May 22, 2022
bfdd62e
(#12) Fix typo
May 22, 2022
b09dd3f
Merge branch 'master' of https://github.com/LaksCastro/shared-storage…
May 22, 2022
c292ac2
Merge branch 'v0.3.0' of https://github.com/LaksCastro/shared-storage…
May 22, 2022
6925237
(#12) Add original Android docs reference in all modules
May 22, 2022
fcffa1d
(#12)Minor `index.md` improvements
May 22, 2022
1dc4c63
(#12) Minor `README.md` improvements
May 22, 2022
b519603
(#12) Fix `Orignal` typo
May 22, 2022
c8bc183
(#12) Apply review https://github.com/lakscastro/shared-storage/pull/…
May 22, 2022
dc73ee9
(#12) Add sections to categorize changes
May 22, 2022
8c3c075
(#12) Fix indent and link
May 23, 2022
f801691
(#12) Fix doc links
May 23, 2022
2ed784c
Merge pull request #19 from lakscastro/v0.3.0
May 23, 2022
40bc8bf
(#12) Update `CHANGELOG` and code docs
May 23, 2022
d298d69
(#12) Re-add `SimpleStorage` lib to support `DocumentFile.child` API
May 23, 2022
1bfeb88
Merge pull request #45 from lakscastro/fix/RE-ADD-SIMPLE-STORAGE
May 25, 2022
e3873c9
(#46) `.github` folder isn't necessary to pub
May 27, 2022
b0d26aa
(#46) Add unused folders to `pubignore`
May 27, 2022
290f20b
Merge branch 'master' of https://github.com/LaksCastro/shared-storage…
May 27, 2022
dde2e64
(#46) Add unused lib folders to `pubignore`
May 27, 2022
2a16b18
(#46) Log all changes in the `CHAGELOG.md` file
May 28, 2022
b4fbd60
(#46) Add mising docs to all new APIs
May 29, 2022
e72cce4
(#46) Fix broken link
May 29, 2022
0c37dfb
(#46) Remove redundant title
May 29, 2022
07941ce
(#46) Fix mismatch `h2`
May 29, 2022
95a5d0c
(#9) Add auto-publish by using https://github.com/lakscastro/sample-d…
May 29, 2022
5fdbf8b
(#9) Add trigger by `workflow_dispatch`
May 29, 2022
de485be
Merge pull request #47 from lakscastro/feat/auto-publish-on-push-release
May 29, 2022
aec489a
Merge pull request #43 from lakscastro/docs/FULL-DOCS
May 29, 2022
01f6fbf
(#46) Add migration notes and missing plugin development guide
May 29, 2022
44963b9
Merge pull request #49 from lakscastro/docs/FULL-DOCS
May 29, 2022
a3b9e71
(#46) Fix typo
May 29, 2022
ef4837c
(#46) Remove duplicated docs
May 29, 2022
888bc6c
Merge branch 'master' of https://github.com/LaksCastro/shared-storage
May 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"files": [
"README.md",
"docs/Getting Started.md"
],
"imageSize": 100,
"contributorsPerLine": 7,
"contributorsSortAlphabetically": false,
"skipCi": true,
"contributors": [
{
"login": "lakscastro",
"name": "lask",
"avatar_url": "https://avatars.githubusercontent.com/u/51419598?v=4",
"profile": "https://lakscastro.github.io",
"contributions": [
"code",
"maintenance",
"doc"
]
},
{
"login": "ankitparmar007",
"name": "ankitparmar007",
"avatar_url": "https://avatars.githubusercontent.com/u/73648141?v=4",
"profile": "https://github.com/ankitparmar007",
"contributions": [
"bug"
]
},
{
"login": "aplicatii-romanesti",
"name": "www.bibliotecaortodoxa.ro",
"avatar_url": "https://avatars.githubusercontent.com/u/1148228?v=4",
"profile": "https://www.bibliotecaortodoxa.ro",
"contributions": [
"code",
"bug",
"ideas"
]
},
{
"login": "dangilbert",
"name": "dangilbert",
"avatar_url": "https://avatars.githubusercontent.com/u/6799566?v=4",
"profile": "https://github.com/dangilbert",
"contributions": [
"code",
"bug"
]
},
{
"login": "dhaval-k-simformsolutions",
"name": "dhaval-k-simformsolutions",
"avatar_url": "https://avatars.githubusercontent.com/u/90894202?v=4",
"profile": "https://github.com/dhaval-k-simformsolutions",
"contributions": [
"bug",
"ideas"
]
}
],
"projectName": "shared-storage",
"projectOwner": "lakscastro",
"repoType": "github",
"repoHost": "https://github.com"
}
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[*.{kt,kts}]
# possible values: number (e.g. 2), "unset" (makes ktlint ignore indentation completely)
indent_size=2
# true (recommended) / false
insert_final_newline=true
# possible values: number (e.g. 120) (package name, imports & comments are ignored), "off"
# it's automatically set to 100 on `ktlint --android ...` (per Android Kotlin Style Guide)
max_line_length=80
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: lakscastro

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
1 change: 1 addition & 0 deletions .github/secretvault/secretvault.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Secret Vault . . .
24 changes: 24 additions & 0 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build MkDocs
on:
workflow_dispatch:
push:
branches:
- release

jobs:
sync:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout to documentation branch
run: |
git fetch
git checkout ${{ github.ref_name }}

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: mkdocs.yaml
EXTRA_PACKAGES: build-base
25 changes: 23 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
on:
name: Publish new plugin version
on:
workflow_dispatch:
push:
branches:
- release
Expand All @@ -11,5 +13,24 @@ jobs:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1

- name: Run Pub Publish
- name: Checkout to release branch
run: |
git fetch
git checkout ${{ github.ref_name }}

- name: Create credentials file
run: echo $PUB_CREDENTIALS > ~/pub-credentials.json
env:
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }}

- name: Add credentials to Dart folder
run: |
mkdir -p ${XDG_CONFIG_HOME:-${HOME:-default}}/dart
touch ${XDG_CONFIG_HOME:-${HOME:-default}}/dart/pub-credentials.json
cp ~/pub-credentials.json ${XDG_CONFIG_HOME:-${HOME:-default}}/dart/pub-credentials.json
env:
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }}

- name: Publish
run: dart pub publish --force

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
.svn/

*/**/pubspec.lock
pubspec.lock
venv/
site/

# IntelliJ related
*.iml
Expand Down
10 changes: 6 additions & 4 deletions .pubignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.buildlog/
.history
.svn/
.github/

# IntelliJ related
*.iml
Expand All @@ -16,10 +17,11 @@
.idea/
*/**/local.properties
loca.properties
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
.vscode/
site/
docs/
*venv/
mkdocs.yaml

*/**/.metadata
.metadata
Expand Down
107 changes: 100 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,110 @@
## 0.3.0

Major release focused on support for `Storage Access Framework`.

### Breaking Changes

- `minSdkVersion` set to `19`.
- `getMediaStoreContentDirectory` return type changed to `Uri`.
- Import package directive path is now modular. Which means you need to import the modules you are using:
- `import 'package:shared_storage/saf.dart' as saf;` to enable **Storage Access Framework** API.
- `import 'package:shared_storage/environment.dart' as environment;` to enable **Environment** API.
- `import 'package:shared_storage/media_store.dart' as mediastore;` to enable **Media Store** API.
- `import 'package:shared_storage/shared_storage' as sharedstorage;` if you want to import all above and as a single module (Not recommended because can conflict/override names/methods).

### New Features

See the label [reference here](/docs/Usage/API%20Labeling.md).

- <samp>Original</samp> `listFiles`. This API does the same thing as `DocumentFile.listFiles` but through Android queries and not calling directly the `DocumentFile.listFiles` API for performance reasons.

- <samp>Internal</samp> `DocumentFile` from [`DocumentFile`](https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile) SAF class.

- <samp>Internal</samp> `QueryMetadata` metadata of the queries used by `listFiles` API.

- <samp>Internal</samp> `PartialDocumentFile`. Represents a partial document file returned by `listFiles` API.

- `openDocumentTree` now accepts `grantWritePermission` and `initialUri` params which, respectively, sets whether or not grant write permission level and the initial uri location of the folder authorization picker.

- <samp>Mirror</samp> `DocumentFileColumn` from [`DocumentsContract.Document.<Column>`](https://developer.android.com/reference/android/provider/DocumentsContract.Document) SAF class.

- <samp>Mirror</samp> `canRead` from [`DocumentFile.canRead`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#canRead()>). Returns `true` if the caller can read the given `uri`.

- <samp>Mirror</samp> `canWrite` from [`DocumentFile.canWrite`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#canWrite()>). Returns `true` if the caller can write to the given `uri`.

- <samp>Mirror</samp> `getDocumentThumbnail` from [`DocumentsContract.getDocumentThumbnail`](<https://developer.android.com/reference/android/provider/DocumentsContract#getDocumentThumbnail(android.content.ContentResolver,%20android.net.Uri,%20android.graphics.Point,%20android.os.CancellationSignal)>). Returns the image thumbnail of a given `uri`, if any (e.g documents that can show a preview, like image or pdf, otherwise `null`).

- <samp>Mirror</samp> `exists` from [`DocumentsContract.exists`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#exists()>). Returns `true` if a given `uri` exists.

- <samp>Mirror</samp> `buildDocumentUriUsingTree` from [`DocumentsContract.buildDocumentUriUsingTree`](<https://developer.android.com/reference/android/provider/DocumentsContract#buildDocumentUriUsingTree(android.net.Uri,%20java.lang.String)>).

- <samp>Mirror</samp> `buildDocumentUri` from [`DocumentsContract.buildDocumentUri`](<https://developer.android.com/reference/android/provider/DocumentsContract#buildDocumentUri(java.lang.String,%20java.lang.String)>).

- <samp>Mirror</samp> `buildTreeDocumentUri` from [`DocumentsContract.buildTreeDocumentUri`](<https://developer.android.com/reference/android/provider/DocumentsContract#buildTreeDocumentUri(java.lang.String,%20java.lang.String)>).

- <samp>Mirror</samp> `delete` from [`DocumentFile.delete`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#delete()>). Self explanatory.

- <samp>Mirror</samp> `createDirectory` from [`DocumentFile.createDirectory`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#createDirectory(java.lang.String)>). Creates a new child document file that represents a directory given the `displayName` (folder name).

- <samp>Alias</samp> `createFile`. Alias for `createFileAsBytes` or `createFileAsString` depending which params are provided.

- <samp>Mirror</samp> `createFileAsBytes` from [`DocumentFile.createFile`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#createFile(java.lang.String,%20java.lang.String)>). Given the parent uri, creates a new child document file that represents a single file given the `displayName`, `mimeType` and its `content` in bytes (file name, file type and file content in raw bytes, respectively).

- <samp>Alias</samp> `createFileAsString`. Alias for `createFileAsBytes(bytes: Uint8List.fromList('file content...'.codeUnits))`.

- <samp>Mirror</samp> `documentLength` from [`DocumentFile.length`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#length()>). Returns the length of the given file (uri) in bytes. Returns 0 if the file does not exist, or if the length is unknown.

- <samp>Mirror</samp> `lastModified` from [`DocumentFile.lastModified`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#lastModified()>). Returns the time when the given file (uri) was last modified, measured in milliseconds since January 1st, 1970, midnight. Returns 0 if the file does not exist, or if the modified time is unknown.

- <samp>Mirror</samp> `findFile` from [`DocumentFile.findFile`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#findFile(java.lang.String)>). Search through listFiles() for the first document matching the given display name, this method has a really poor performance for large data sets, prefer using `child` instead.

- <samp>Mirror</samp> `fromTreeUri` from [`DocumentFile.fromTreeUri`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#fromTreeUri(android.content.Context,%20android.net.Uri)>).

- <samp>Mirror</samp> `renameTo` from [`DocumentFile.renameTo`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#renameTo(java.lang.String)>). Rename a document file given its `uri` to the given `displayName`.

- <samp>Mirror</samp> `parentFile` from [`DocumentFile.parentFile`](<https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile#getParentFile()>). Get the parent document of the given document file from its uri.

- <samp>Mirror</samp> `copy` from [`DocumentsContract.copyDocument`](<https://developer.android.com/reference/android/provider/DocumentsContract#copyDocument(android.content.ContentResolver,%20android.net.Uri,%20android.net.Uri)>). Copies the given document to the given `destination`.

- <samp>Original</samp> `getDocumentContent`. Read a document file from its uri by opening a input stream and returning its bytes.

- <samp>External</samp> `child` from [`com.anggrayudi.storage.file.DocumentFile.child`](https://github.com/anggrayudi/SimpleStorage/blob/551fae55641dc58a9d3d99cb58fdf51c3d312b2d/storage/src/main/java/com/anggrayudi/storage/file/DocumentFileExt.kt#L270). Find the child file of a given parent uri and child name, null if doesn't exists (faster than `findFile`).

- <samp>Original `UNSTABLE`</samp> `openDocumentFile`. Open a file uri in a external app, by starting a new activity with `ACTION_VIEW` Intent.

- <samp>Original `UNSTABLE`</samp> `getRealPathFromUri`. Return the real path to work with native old `File` API instead Uris, be aware this approach is no longer supported on Android 10+ (API 29+) and though new, this API is **marked as deprecated** and should be migrated to a _scoped-storage_ approach.

- <samp>Alias</samp> `getDocumentContentAsString`. Alias for `getDocumentContent`. Convert all bytes returned by the original method into a `String`.

- <samp>Internal</samp> `DocumentBitmap` class added. Commonly used as thumbnail image/bitmap of a `DocumentFile`.

- <samp>Extension</samp> `UriDocumentFileUtils` on `Uri` (Accesible by `uri.extensionMethod(...)`).

- <samp>Alias</samp> `toDocumentFile`. Alias for `DocumentFile.fromTreeUri(this)` which is an alias for `fromTreeUri`. method: convert `this` to the respective `DocumentFile` (if exists, otherwise `null`).
- <samp>Alias</samp> `openDocumentFile`. Alias for `openDocumentFile`.

- <samp>Mirror</samp> `getDownloadCacheDirectory` from [`Environment.getDataDirectory`](https://developer.android.com/reference/android/os/Environment#getDownloadCacheDirectory%28%29).

- <samp>Mirror</samp> `getStorageDirectory` from [`Environment.getStorageDirectory`](https://developer.android.com/reference/android/os/Environment#getStorageDirectory%28%29).

### Deprecation Notices

- `getExternalStoragePublicDirectory` was marked as deprecated and should be replaced with an equivalent API depending on your use-case, see [how to migrate `getExternalStoragePublicDirectory`](https://stackoverflow.com/questions/56468539/getexternalstoragepublicdirectory-deprecated-in-android-q). This deprecation is originated from official Android documentation and not by the plugin itself.

## 0.2.0

Add basic support for `Storage Access Framework` and `targetSdk 31`
Add basic support for `Storage Access Framework` and `targetSdk 31`.

- The package now supports basic intents from `Storage Access Framework`
- Your App needs update the `build.gradle` by targeting the current sdk to `31`
- The package now supports basic intents from `Storage Access Framework`.
- Your App needs update the `build.gradle` by targeting the current sdk to `31`.

## 0.1.1

Minor improvements on `pub.dev` documentation
Minor improvements on `pub.dev` documentation.

- Add `example/` folder
- Add missing `pubspec.yaml` properties
- Add `example/` folder.
- Add missing `pubspec.yaml` properties.

## 0.1.0

Initial release
Initial release.
Loading