@@ -83,6 +83,7 @@ All public classes and methods are well-documented.
8383 - [ Pick visualMedia] ( #pick-visualmedia )
84843 . 📂 [ ** App Directories** ] ( #-app-directories ) (🖼️ [ * see examples* ] ( #app-directories-examples ) )
8585 - [ Supported app directories] ( #supported-app-directories )
86+ - [ Get all directories at once] ( #get-all-directories-at-once )
8687 - ♻️ [ Plugin Cache cleaner] ( #plugin-cache-cleaner )
87884 . 🛡️ [ ** Persisted permissions** ] ( #persisted-permissions ) (🖼️ [ * see examples* ] ( #persisted-permissions-examples ) )
8889 - [ PersistedPermission data class] ( #persistedpermission-class )
@@ -114,7 +115,7 @@ Add the following dependency to your `pubspec.yaml` file:
114115
115116``` yaml
116117dependencies :
117- docman : ^1.0 .0
118+ docman : ^1.2 .0
118119` ` `
119120
120121Then run ➡️ ` flutter pub get`.
@@ -266,6 +267,30 @@ Future<Directory?> externalCache() => DocMan.dir.externalCache();
266267Future<Directory?> filesExt() => DocMan.dir.filesExt();
267268```
268269
270+ #### ** Get all directories at once:**
271+
272+ It is possible to get all directories at once.
273+ The method returns a map with the ** directory name** as the ` key ` and ** directory path** as ` value ` .
274+ Only ` cacheExt ` & ` filesExt ` can be empty strings if external storage is not available.
275+
276+ ``` dart
277+ ///Get all directories at once via helper method
278+ Future<void> getAllDirs() async {
279+ final Map<String, String> dirs = await DocMan.dir.all();
280+
281+ print(dirs);
282+ }
283+
284+ /// Result Example:
285+ final dirs = {
286+ "cache": "/data/user/0/devdf.plugins.docman_example/cache",
287+ "files": "/data/user/0/devdf.plugins.docman_example/files",
288+ "data": "/data/user/0/devdf.plugins.docman_example/app_flutter",
289+ "cacheExt": "/storage/emulated/0/Android/data/devdf.plugins.docman_example/cache",
290+ "filesExt": "/storage/emulated/0/Android/data/devdf.plugins.docman_example/files"
291+ };
292+ ```
293+
269294<a name =" plugin-cache-cleaner " ></a >
270295
271296#### ♻️ ** Plugin Cache cleaner**
@@ -723,15 +748,14 @@ and can be performed in the background (with isolates or WorkManager).
723748 ```dart
724749 Future<DocumentThumbnail?> thumbnail(DocumentFile file) => file.thumbnail(width: 256, height: 256, quality: 70);
725750 ```
726-
751+
727752> [!NOTE]
728753> ⚠️ Sometimes due to different document providers, thumbnail can have bigger dimensions, than requested.
729754> Some document providers may not support thumbnail generation.
730755
731756> [!TIP]
732757> ⚠️ If file is local image, only `jpg`, `png`, `webp`, `gif`
733758> types are currently supported for thumbnail generation, in all other cases support depends on the document provider.
734-
735759
736760- `thumbnailFile` `📄` Get the thumbnail of the file as a `File`.
737761
0 commit comments