@capacitor/filesystem
Version:
The Filesystem API provides a NodeJS-like API for working with files on the device.
124 lines • 4.08 kB
JavaScript
export var Directory;
(function (Directory) {
/**
* 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 accessible on Android 10 unless the app enables legacy External Storage
* by adding `android:requestLegacyExternalStorage="true"` in the `application` tag
* in the `AndroidManifest.xml`.
* On Android 11 or newer the app can only access the files/folders the app created.
*
* @since 1.0.0
*/
Directory["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.
*
* @since 1.0.0
*/
Directory["Data"] = "DATA";
/**
* The Library directory.
* On iOS it will use the Library directory.
* On Android it's the directory holding application files.
* Files will be deleted when the application is uninstalled.
*
* @since 1.1.0
*/
Directory["Library"] = "LIBRARY";
/**
* 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.
*
* @since 1.0.0
*/
Directory["Cache"] = "CACHE";
/**
* 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.
*
* @since 1.0.0
*/
Directory["External"] = "EXTERNAL";
/**
* 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 accessible on Android 10 unless the app enables legacy External Storage
* by adding `android:requestLegacyExternalStorage="true"` in the `application` tag
* in the `AndroidManifest.xml`.
* It's not accessible on Android 11 or newer.
*
* @since 1.0.0
*/
Directory["ExternalStorage"] = "EXTERNAL_STORAGE";
/**
* The external cache directory.
* On iOS it will use the Documents directory.
* On Android it's the primary shared/external cache.
*
* @since 7.1.0
*/
Directory["ExternalCache"] = "EXTERNAL_CACHE";
/**
* The Library directory without cloud backup. Used in iOS.
* On Android it's the directory holding application files.
*
* @since 7.1.0
*/
Directory["LibraryNoCloud"] = "LIBRARY_NO_CLOUD";
/**
* A temporary directory for iOS.
* On Android it's the directory holding the application cache.
*
* @since 7.1.0
*/
Directory["Temporary"] = "TEMPORARY";
})(Directory || (Directory = {}));
export var Encoding;
(function (Encoding) {
/**
* Eight-bit UCS Transformation Format
*
* @since 1.0.0
*/
Encoding["UTF8"] = "utf8";
/**
* Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the
* Unicode character set
* This encoding is only supported on Android.
*
* @since 1.0.0
*/
Encoding["ASCII"] = "ascii";
/**
* Sixteen-bit UCS Transformation Format, byte order identified by an
* optional byte-order mark
* This encoding is only supported on Android.
*
* @since 1.0.0
*/
Encoding["UTF16"] = "utf16";
})(Encoding || (Encoding = {}));
/**
* @deprecated Use `Directory`.
* @since 1.0.0
*/
export const FilesystemDirectory = Directory;
/**
* @deprecated Use `Encoding`.
* @since 1.0.0
*/
export const FilesystemEncoding = Encoding;
//# sourceMappingURL=definitions.js.map