Cordova-plugin-file file operation Arrangement (ii)

Source: Internet
Author: User

Cordove File Instance Demo

I.. cordova.file Get System directory

[javascript]  View plain  copy//directory of the current program    Console.info (cordova.file.applicationDirectory);   //Program Data Directory    console.info (cordova.file.applicationStorageDirectory);  //Program Data Directory    console.info (cordova.file.dataDirectory);  //program's Staging directory    Console.info ( cordova.file.cacheDirectory);     //android extended storage App Catalog    console.info ( Cordova.file.externalApplicationStorageDirectory);  //android Extended Storage Data Catalog    Console.info ( Cordova.file.externalDataDirectory);  //android Extended Storage Cache directory    Console.info ( cordova.file.externalCacheDirectory);  //android extension root directory    Console.info ( cordova.file.tempDirectory) Directories in;     /**ios **/  //Temp directory    Console.info ( Cordova.file.tempDirectory);  //Cloud storage directory    console.info (cordova.file.syncedDataDirectory);   //Document Catalog    Console.info (Cordova.file.documentsDirectory);  //shared directory    console.info (cordova.file.sharedDirectory);   Android under directory output
[HTML] View plain copy//file:///android_asset///file:///data/data/io.cordova.myapp84ea27///file:///data/data/io.c ordova.myapp84ea27/files///file:///data/data/io.cordova.myapp84ea27/cache///file:///storage/emulated/0/android /data/io.cordova.myapp84ea27///file:///storage/emulated/0/android/data/io.cordova.myapp84ea27/files///file:/// storage/emulated/0/android/data/io.cordova.myapp84ea27/cache/

Second, the sandbox mode of direct operation

Window.requestfilesystem (type, size, SUCCESSCB,ERRORCB), request a quota, do not need to use Requestquota in the plug-in

1. Create a file

[JavaScript] View plain copy

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: