From 6a6cd8b9818cba49fdd8ede7826fc9e2b5d32f62 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Mon, 30 Mar 2020 23:49:15 +0200 Subject: [PATCH] docs(types): explain FilesystemDirectory types (#2663) --- core/src/core-plugin-definitions.ts | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/core/src/core-plugin-definitions.ts b/core/src/core-plugin-definitions.ts index fdf2df90ff..5ad25babcf 100644 --- a/core/src/core-plugin-definitions.ts +++ b/core/src/core-plugin-definitions.ts @@ -590,22 +590,40 @@ export interface FilesystemPlugin extends Plugin { export enum FilesystemDirectory { /** * The Documents directory + * On iOS it's the app's documents directory. + * Use this directory to store user-generated content. + * On Android it's the Public Documents folder, so it's accessible from other apps. + * It's not accesible on Android 10 and newer. */ Documents = 'DOCUMENTS', /** * The Data directory + * On iOS it will use the Documents directory + * On Android it's the directory holding application files. + * Files will be deleted when the application is uninstalled. */ Data = 'DATA', /** * The Cache directory + * Can be deleted in cases of low memory, so use this directory to write app-specific files + * that your app can re-create easily. */ Cache = 'CACHE', /** - * The external directory (Android only) + * The external directory + * On iOS it will use the Documents directory + * On Android it's the directory on the primary shared/external + * storage device where the application can place persistent files it owns. + * These files are internal to the applications, and not typically visible + * to the user as media. + * Files will be deleted when the application is uninstalled. */ External = 'EXTERNAL', /** - * The external storage directory (Android only) + * The external storage directory + * On iOS it will use the Documents directory + * On Android it's the primary shared/external storage directory. + * It's not accesible on Android 10 and newer. */ ExternalStorage = 'EXTERNAL_STORAGE' }