From 4d8e41b7ba3fbaf4d4f4aa960c41663ceab74cd3 Mon Sep 17 00:00:00 2001 From: Vitaliy Zarubin Date: Mon, 15 May 2023 12:46:27 +0300 Subject: [PATCH] [xdga_directories] updated readme --- packages/xdga_directories/README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/packages/xdga_directories/README.md b/packages/xdga_directories/README.md index a27abac..cc3eec2 100644 --- a/packages/xdga_directories/README.md +++ b/packages/xdga_directories/README.md @@ -2,7 +2,31 @@ A Dart package for reading directory path on Aurora OS. -To use this package, the basic XDG values for the following are available via a Dart API: +## Usage + +This package can be used alone, but the best solution would be to use `path_provider`. + +```yaml +dependencies: + xdga_directories: ^0.0.0 # @todo Not published +``` + +Then you can import `xdga_directories` in your Dart code: + +```dart +import 'package:xdga_directories/xdga_directories.dart' as xdga; + +final appDataLocation = xdga.getAppDataLocation(); +final cacheLocation = xdga.getCacheLocation(); +final documentsLocation = xdga.getDocumentsLocation(); +final downloadLocation = xdga.getDownloadLocation(); +final musicLocation = xdga.getMusicLocation(); +final picturesLocation = xdga.getPicturesLocation(); +final genericDataLocation = xdga.getGenericDataLocation(); +final moviesLocation = xdga.getMoviesLocation(); +``` + +## Supported APIs - `getAppDataLocation` - Returns a directory location where persistent application data can be stored. - `getCacheLocation` - Returns a directory location where user-specific non-essential (cached) data should be written.