You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`cordova.file.externalRootDirectory` - External storage (SD card) root. (_Android_). See [Quirks](#androids-external-storage-quirks).
100
98
101
99
*`cordova.file.tempDirectory` - Temp directory that the OS can clear at will. Do not
102
100
rely on the OS to clear this directory; your app should always remove files as
103
-
applicable. (_iOS_, _OSX_, _windows_)
101
+
applicable. (_iOS_)
104
102
105
103
*`cordova.file.syncedDataDirectory` - Holds app-specific files that should be synced
106
-
(e.g. to iCloud). (_iOS_, _windows_)
104
+
(e.g. to iCloud). (_iOS_)
107
105
108
106
*`cordova.file.documentsDirectory` - Files private to the app, but that are meaningful
109
-
to other application (e.g. Office files). Note that for _OSX_ this is the user's `~/Documents` directory. (_iOS_, _OSX_)
110
-
111
-
*`cordova.file.sharedDirectory` - Files globally available to all applications (_BlackBerry 10_)
107
+
to other application (e.g. Office files). (_iOS_)
112
108
113
109
## File System Layouts
114
110
@@ -191,41 +187,6 @@ These limitations only applies to external filesystems (e.g. `cordova.file.exter
191
187
192
188
If interfacing with the external file system is a requirement for your application, consider using a [MediaStore](https://www.npmjs.com/search?q=ecosystem%3Acordova%20storage%20access%20framework) plugin instead.
**Note**: This is the layout for non sandboxed applications. I you enable sandboxing, the `applicationStorageDirectory` will be below ` ~/Library/Containers/<bundle-id>/Data/Library/Application Support`.
208
-
209
-
\* Files persist across app restarts and upgrades, but this directory can
210
-
be cleared whenever the OS desires. Your app should be able to recreate any
211
-
content that might be deleted. You should clear this directory as
212
-
appropriate for your application.
213
-
214
-
\*\* Allows access to the entire file system. This is only available for non sandboxed apps.
@@ -510,10 +471,6 @@ var my_media = new Media('cdvfile://localhost/temporary/path/to/file.mp3', ...);
510
471
my_media.play();
511
472
```
512
473
513
-
#### cdvfile quirks
514
-
- Using `cdvfile://` paths in the DOM is not supported on Windows platform (a path can be converted to native instead).
515
-
516
-
517
474
## List of Error Codes and Meanings
518
475
When an error is thrown, one of the following codes will be used.
519
476
@@ -582,7 +539,7 @@ When you get file system access using `requestFileSystem`, access is granted for
582
539
583
540
Here is a request for persistent storage.
584
541
585
-
>*Note* When targeting WebView clients (instead of a browser) or native apps (Windows), you dont need to use `requestQuota` before using persistent storage.
542
+
>*Note* When targeting WebView clients (instead of a browser), you dont need to use `requestQuota` before using persistent storage.
586
543
587
544
```js
588
545
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fs) {
@@ -848,12 +805,6 @@ function displayImageByFileURL(fileEntry) {
848
805
}
849
806
```
850
807
851
-
If you are using some platform-specific URIs instead of a FileEntry and you want to display an image, you may need to include the main part of the URI in the Content-Security-Policy <meta> element in index.html. For example, on Windows 10, you can include `ms-appdata:` in your <meta> element. Here is an example.
In the code here, you create directories in the root of the app storage location. You could use this code with any writable storage location (that is, any DirectoryEntry). Here, you write to the application cache (assuming that you used window.TEMPORARY to get your FileSystem object) by passing fs.root into this function.
0 commit comments