pub repository
mirror.p-hatan.compath_provider
1.6.16Flutter plugin for getting commonly used locations on host platform file systems, such as the temp and app data directories.
Readme
path_provider
A Flutter plugin for finding commonly used locations on the filesystem. Supports iOS, Android, Linux and MacOS. Not all methods are supported on all platforms.
Usage
To use this plugin, add path_provider as a dependency in your pubspec.yaml file.
Example
Directory tempDir = await getTemporaryDirectory();
String tempPath = tempDir.path;
Directory appDocDir = await getApplicationDocumentsDirectory();
String appDocPath = appDocDir.path;
Please see the example app of this plugin for a full example.
Usage in tests
path_provider now uses a PlatformInterface, meaning that not all platforms share the a single PlatformChannel-based implementation.
With that change, tests should be updated to mock PathProviderPlatform rather than PlatformChannel.
See this path_provider test for an example.
Changelog
1.6.16
- Update Windows endorsement verison
1.6.15
- Endorse Windows implementation.
- Remove the need to call disablePathProviderPlatformOverride in tests
1.6.14
- Update package:e2e -> package:integration_test
1.6.13
- Update package:e2e reference to use the local version in the flutter/plugins repository.
1.6.12
- Fixed a Java lint in a test.
1.6.11
- Updated documentation to reflect the need for changes in testing for federated plugins
1.6.10
- Linux implementation endorsement
1.6.9
- Post-v2 Android embedding cleanups.
1.6.8
- Update lower bound of dart dependency to 2.1.0.
1.6.7
- Remove Android dependencies fallback.
- Require Flutter SDK 1.12.13+hotfix.5 or greater.
- Fix CocoaPods podspec lint warnings.
1.6.6
- Replace deprecated
getFlutterEnginecall on Android.
1.6.5
- Remove unused class name in pubspec.
1.6.4
- Endorsed macOS implementation.
1.6.3
- Use
path_provider_platform_interfacein core plugin.
1.6.2
- Move package contents into
path_providerfor platform federation.
1.6.1
- Make the pedantic dev_dependency explicit.
1.6.0
- Support for retrieving the downloads directory was added.
The call for this is
getDownloadsDirectory.
1.5.1
- Remove the deprecated
author:field from pubspec.yaml - Migrate the plugin to the pubspec platforms manifest.
- Require Flutter SDK 1.10.0 or greater.
1.5.0
- Add macOS support.
1.4.5
- Add support for v2 plugins APIs.
1.4.4
- Update driver tests in the example app to e2e tests.
1.4.3
- Update driver tests in the example app to e2e tests.
- Add missing DartDocs and a lint to prevent further regressions.
1.4.2
- Update and migrate iOS example project by removing flutter_assets, change "English" to "en", remove extraneous xcconfigs, update to Xcode 11 build settings, remove ARCHS, and build pods as libraries instead of frameworks.
1.4.1
- Remove AndroidX warnings.
1.4.0
- Support retrieving storage paths on Android devices with multiple external
storage options. This adds a new class
AndroidEnvironmentthat shadows the directory names from Androidsandroid.os.Environmentclass. - Fixes
getLibraryDirectorysemantics & tests.
1.3.1
- Define clang module for iOS.
1.3.0
- Added iOS-only support for
getLibraryDirectory. - Update integration tests and example test.
- Update example app UI to use a
ListViewshow the list of content. - Update .gitignore to include Xcode build output folder
**/DerivedData/
1.2.2
- Correct the integration test for Android's
getApplicationSupportDirectorycall. - Introduce
setMockPathProviderPlatformfor API for tests. - Adds missing unit and integration tests.
1.2.1
- Fix fall through bug.
1.2.0
- On Android,
getApplicationSupportDirectoryis now supported usinggetFilesDir. getExternalStorageDirectorynow returnsnullinstead of throwing an exception if no external files directory is available.
1.1.2
getExternalStorageDirectorynow usesgetExternalFilesDiron Android.
1.1.1
- Cast error codes as longs in iOS error strings to ensure compatibility between arm32 and arm64.
1.1.0
- Added
getApplicationSupportDirectory. - Updated documentation for
getApplicationDocumentsDirectoryto suggest usinggetApplicationSupportDirectoryon iOS andgetExternalStorageDirectoryon Android. - Updated documentation for
getTemporaryDirectoryto suggest using it for caches of files that do not need to be backed up. - Updated integration tests and example to reflect the above changes.
1.0.0
- Added integration tests.
0.5.0+1
- Log a more detailed warning at build time about the previous AndroidX migration.
0.5.0
- Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.
0.4.1
- Updated Gradle tooling to match Android Studio 3.1.2.
0.4.0
- Breaking change. Set SDK constraints to match the Flutter beta release.
0.3.1
- Simplified and upgraded Android project template to Android SDK 27.
- Updated package description.
0.3.0
- Breaking change. Upgraded to Gradle 4.1 and Android Studio Gradle plugin 3.0.1. Older Flutter projects need to upgrade their Gradle setup as well in order to use this version of the plugin. Instructions can be found here.
0.2.2
- Add FLT prefix to iOS types
0.2.1+1
- Updated README
0.2.1
- Add function to determine external storage directory.
0.2.0
- Upgrade to new plugin registration. (https://groups.google.com/forum/#!topic/flutter-dev/zba1Ynf2OKM)
0.1.3
- Upgrade Android SDK Build Tools to 25.0.3.
0.1.2
- Add test.
0.1.1
- Change to README.md.
0.1.0
- Initial Open Source release.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add path_providerpubspec.yaml
name: path_provider
description: Flutter plugin for getting commonly used locations on host platform file systems, such as the temp and app data directories.
homepage: https://github.com/flutter/plugins/tree/master/packages/path_provider/path_provider
version: 1.6.16
flutter:
plugin:
platforms:
android:
package: io.flutter.plugins.pathprovider
pluginClass: PathProviderPlugin
ios:
pluginClass: FLTPathProviderPlugin
macos:
default_package: path_provider_macos
linux:
default_package: path_provider_linux
windows:
default_package: path_provider_windows
dependencies:
flutter:
sdk: flutter
path_provider_platform_interface: ^1.0.1
path_provider_macos: ^0.0.4
path_provider_linux: ^0.0.1
path_provider_windows: ^0.0.2
dev_dependencies:
integration_test:
path: ../../integration_test
flutter_test:
sdk: flutter
flutter_driver:
sdk: flutter
test: any
uuid: "^1.0.0"
pedantic: ^1.8.0
mockito: ^4.1.1
plugin_platform_interface: ^1.0.0
environment:
sdk: ">=2.1.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | 2017-05-03T13:02:53.217875Z | Download | a6dd5ca349f5cb748b9fa435cc986bf3c0976704bdf22877f69899f12d371e4f |
| 0.1.1 | 2017-05-04T09:24:22.677549Z | Download | 6e9d01a619d25d21118ac365f2203363e49f0da2a0cd52d5636873a318d56be8 |
| 0.1.2 | 2017-05-08T12:13:22.304174Z | Download | b5639d4e6509bbe562c836fd8d6e090be4c1c2e7235a6e5efb675c625c416582 |
| 0.1.3 | 2017-05-09T18:24:35.828590Z | Download | e72e51b18244210299a68b31baf754aed474b171a0df88f8b9bf30a3f6d443f9 |
| 0.2.0 | 2017-05-10T12:16:51.439776Z | Download | 47354984291e40deba5fe9e92af9fd87a30c440e1296596fff7af11277847777 |
| 0.2.1+1 | 2017-05-17T07:36:57.487143Z | Download | e442ada154cb04fe56602f6962be9b69a7ec403417e337cacee6c97642472931 |
| 0.2.2 | 2017-12-04T08:35:31.856646Z | Download | 744b92f4fbaf5fdd80affa7918b0abeffc6a984f0ad0262d77d344e19d466d49 |
| 0.3.0 | 2017-12-20T13:56:45.483110Z | Download | 9236407128e905307b7776961b8b2cb303e3af523c792b33e9bc9150276ce731 |
| 0.3.1 | 2018-01-12T15:08:13.477461Z | Download | fe8250b50db8b4e6f8f462c9359a301eef8c500248e3b1fb64c5a222efc651ee |
| 0.4.0 | 2018-03-09T16:11:31.709842Z | Download | 7abb12c0caad6c6118229808389d7c849c6c07851243c092a48ea97ffc1b8701 |
| 0.4.1 | 2018-06-01T19:13:23.778477Z | Download | b1938bf07601fcb72c94cdfcbcb6044221bf6ffb1b36e810a87abb66c20c0edb |
| 0.5.0 | 2019-01-24T23:22:06.221453Z | Download | 63c1a6da06550ed9a2d736d378e6fc4756a4ee5e1691fd08c45e25b46087ab0d |
| 0.5.0+1 | 2019-02-08T02:02:22.695281Z | Download | c100f37076f107d7eb260ad1779bdc266e9689b43615d813f840a0a01940aa81 |
| 1.0.0 | 2019-05-03T22:16:42.031749Z | Download | 8c0ff4b1533cc478ad7bf546a016e8618bbc21ec04c3103c71b2c665e0f4e300 |
| 1.1.0 | 2019-05-08T23:19:01.896878Z | Download | 651ba33339d2519b27e7a488358fe2f322dea8fac60f994e24f2ccbda4bc960e |
| 1.1.2 | 2019-07-08T15:42:20.450029Z | Download | 22ddd638dd1fb7421072d6101f8ba2290311c53584bf4d58413cff682d51ea11 |
| 1.2.0 | 2019-07-24T15:34:14.078653Z | Download | 2dc54a647fcace8c75e9d58cbc648f0c49fa1f160e7c574209e91817c4155580 |
| 1.2.2 | 2019-09-04T23:39:16.589060Z | Download | e5146d39855e2d97272c2ea0cc142ae5e4a11c58c350975a3c99be8ee167a8e9 |
| 1.3.0 | 2019-09-05T21:50:01.993167Z | Download | 94c743f47860dbc0a7b9a08bf647da571f1ced7c02442fc75fd776dcd66db59d |
| 1.3.1 | 2019-10-16T22:48:13.700610Z | Download | 6ace780d2eebc0ffa77c611012d2f91f6f6277bc68916fb9e1eacd7e03b7709b |
| 1.4.0 | 2019-10-21T16:37:20.669594Z | Download | 267c49ffcccfc312ef65eff8fea7f3741e760f8b109dac5a3db8a07856affce0 |
| 1.4.2 | 2019-11-13T19:00:50.203923Z | Download | 29aae7fdc5f3d849068e057feed415f05a876a3523ebf5f8d174e5abf39b07fe |
| 1.4.4 | 2019-11-20T16:37:54.245102Z | Download | d760ed42dce962562957c56e6033d6bbc70cd2faca8c7040656aedf856bec34b |
| 1.4.5 | 2019-11-25T23:17:35.620824Z | Download | 7e75d8ed4dff1a420e4339cdac4fb07c38311dc67460b3d31ec84a6691ed2b06 |
| 1.5.0 | 2019-12-07T01:09:12.867733Z | Download | 088c9b67f3f8821c9560f8f387be8894973e5abada9b2b6d92cee62f163350dd |
| 1.5.1 | 2019-12-10T04:45:14.831499Z | Download | cb68b302831f5365bd021bdac6af8eb6be64544d36cf94243095391c7d6b9eae |
| 1.6.0 | 2020-01-29T17:34:53.730087Z | Download | c6cf9a11e389c2f7502050ea48f9c5e5630210e0ec668feeff3dc354366c952b |
| 1.6.1 | 2020-02-20T23:54:13.508480Z | Download | 7f141b48e3131bfda0f6343475f0521ebb50becf81dc56eec3dec0cd9eef8766 |
| 1.6.4 | 2020-03-02T20:16:35.064834Z | Download | 11628c3b38f3fb95640adc05f358e17264f3976dd33e692443c3254ec45a4103 |
| 1.6.5 | 2020-03-03T17:39:42.362410Z | Download | b2cf36ac1b26e7ecbea5286e0c451434af47b81a0c33b4ab65cdccb93d221380 |
| 1.6.7 | 2020-04-21T05:07:02.281768Z | Download | b0715a1dddd326f449d6c328ade0a19c458edae7e13e2fc5791aa1242b3e3dd9 |
| 1.6.8 | 2020-05-12T03:48:53.387182Z | Download | bd4913044a3bccfa981618c66bf5251b080059efc15a28051b2d4a7940cc7d41 |
| 1.6.9 | 2020-05-22T00:02:30.806312Z | Download | 2587a4ee67916009d0ae9d13cdd6c7dfab8cf52eea3b211bc15d2f12d11f0c37 |
| 1.6.10 | 2020-06-02T19:51:19.881222Z | Download | 6536e4b0deb2f117b85fda3c8d906d0e352834d2354549ac57a37c723ec17edf |
| 1.6.11 | 2020-06-17T17:28:32.251220Z | Download | d5aeaf96ca92dc95deeef64d17d01d2e86b847f499e05324ee1a5eaa77d48064 |
| 1.6.14 | 2020-08-22T05:10:00.485436Z | Download | 7b83037397771f3f6d520dccb0da86a5220ba279603afd87662d06482b569ea4 |
| 1.6.16 | 2020-09-18T19:06:34.437303Z | Download | 965977f53f125c74af96e8373046871374ce34dd0c50f0dafb5ac64be6f4f436 |
| 1.6.17 | 2020-09-22T10:55:50.856946Z | Download | 5d718047666eb3e573c46b313495db83684e1cc433524bbaa699af3f7a027ba4 |
| 1.6.18 | 2020-09-23T07:57:48.564595Z | Download | 1a1ff1f713ab115f8b11c74564aa8d24448359834a5f42eca485b14798688b86 |
| 1.6.21 | 2020-10-14T21:15:37.330354Z | Download | 181aa64f8a6c05f58dad7f16f0a5cf9cc8a10045d4abfa4d7b68e94b8cfb0a32 |
| 1.6.22 | 2020-10-24T18:42:56.783078Z | Download | 447c78b0d6d56052f04f5533df7451640f6ca81d566ef943177c3ed499681b93 |
| 1.6.24 | 2020-11-03T22:54:48.187879Z | Download | 12b6834c6a78ec9a82adf278194a2c8524fce74bb14434f5043bab5e35bdb86f |
| 1.6.27 | 2021-01-08T01:55:45.917008Z | Download | a7e09f3a1db83be011fb0b1cc5f2f6e3d2c93c797cc54359f784c560a922897b |
| 1.6.28 | 2021-03-17T13:51:13.741217Z | Download | 90ea926097957ffbcb5381fdd7de76f6d5326fcd4689f07d8d4ee42b4040fa85 |
| 2.0.0-nullsafety | 2021-02-05T01:11:46.436856Z | Download | ca4af5316c322255694d30dbff7da2cfbdc1004eb4182e391f14e3a6bc2089b4 |
| 2.0.0-nullsafety.1 | 2021-02-16T17:17:35.922701Z | Download | 4cf0f28036eef558eb484f6065acc5b41d412827b003c0b6908e7e8931f29693 |
| 2.0.0 | 2021-02-22T21:19:29.451974Z | Download | 5e9a353e785b5ab37456ae4b4b342edcc6e882518738b5b698a205144ca62a50 |
| 2.0.1 | 2021-03-02T20:28:23.408683Z | Download | aa1b3572707c240d72569ce01756728cf0c8dca0cc381253d8ca2858c13edfe4 |
| 2.0.2 | 2021-05-25T15:26:25.463768Z | Download | cfdc261c62a7273be7e051b19d27e503927a40919932f790681042a038f3605d |
| 2.0.3 | 2021-09-02T14:09:09.272732Z | Download | 101e72444682f6ed3886a5b6af5434e4946c25de0d0a254f81e99b7f15578bba |
| 2.0.4 | 2021-09-15T21:30:09.112507Z | Download | 7a6929151858214b36140fb847090292d027818e91da7141a2402cbf037b491e |
| 2.0.5 | 2021-09-17T21:32:41.211274Z | Download | b6db8bde5b616225d76875c0235b63db77febcf207fbdc2108af2e825d31b6b0 |
| 2.0.6 | 2021-10-28T01:55:13.262147Z | Download | 47a60af97e55da04d1732091ee3b93c775ab72578f8704312471b09aefb13d2d |
| 2.0.7 | 2021-11-14T14:54:26.981517Z | Download | df05e975c3e0d9d4112c62ab40a022abf8c56d67deb25356a5ebb3d1311017f3 |
| 2.0.8 | 2021-12-09T12:46:35.353035Z | Download | db1cf6c3f906f50d52c18400be575f75ed620f8717f9b6d11263edd95080dfc6 |
| 2.0.9 | 2022-02-10T17:41:32.515002Z | Download | e92dee4d38a9044605cb3fb253e9b46eb9375dfcad4515d0379b44ac90797568 |
| 2.0.10 | 2022-05-10T19:37:24.250616Z | Download | 3f6e0d697dc557ed6589107c8c13eda5ad488285917788379bbf392e3e30ea37 |
| 2.0.11 | 2022-06-06T20:03:59.110193Z | Download | 050e8e85e4b7fecdf2bb3682c1c64c4887a183720c802d323de8a5fd76d372dd |
| 2.0.12 | 2023-01-25T02:03:56.235148Z | Download | dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95 |
| 2.0.13 | 2023-02-22T20:34:42.777614Z | Download | 04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9 |
| 2.0.14 | 2023-03-21T12:36:32.797761Z | Download | c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4 |
| 2.0.15 | 2023-05-08T20:15:31.038902Z | Download | 3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2 |
| 2.1.0 | 2023-08-08T00:37:26.161804Z | Download | 909b84830485dbcd0308edf6f7368bc8fd76afa26a270420f34cabea2a6467a0 |
| 2.1.1 | 2023-08-30T14:54:25.271808Z | Download | a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa |
| 2.1.2 | 2024-01-09T02:36:01.671925Z | Download | b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b |
| 2.1.3 | 2024-04-11T17:32:10.648413Z | Download | c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 |
| 2.1.4 | 2024-07-30T18:41:24.090488Z | Download | fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 |
| 2.1.5 | 2024-10-29T19:51:40.846031Z | Download | 50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd |
| 2.1.6 | 2026-06-15T13:51:07.158561Z | Download | a7f4874f987173da295a61c181b8ee71dab59b332a486b391babf26a1b884825 |
Dependencies
flutter {
"sdk": "flutter"
}
path_provider_linux "^0.0.1"
path_provider_macos "^0.0.4"
path_provider_platform_interface "^1.0.1"
path_provider_windows "^0.0.2"