cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <>
Subject CB-285 (FileSystem paths)
Date Tue, 06 May 2014 14:06:10 GMT
Closer than ever to resolving this (woo!)

The file plugin is now able to read & write to roots on the filesystem
beyond PERSISTENT and TEMPORARY on iOS, Android, and BlackBerry (and maybe

However, you still can't query for the location of these places (doh!)

There's a file-extras plugin in cordova-labs:;a=blob;f=file-extras/fileextras.js;h=1f8f88f7222bd4022f2f802f6825c189b10445d9;hb=aaf61d4

That was used to experiment with an API for this. I think the API is pretty
much fine, and I'd like to add it to the core file plugin rather than have
it as a separate plugin.

This would add:
cordova.plugins.file.getDirectoryForPurpose(purpose, options, win, fail)

Where purpose can be one of:
var Purpose = {
     'data': 0, // General application data (default)
     'documents': 1, // Files that are meaningful to other applciations
(e.g. Office files)
     'cache': 2, // Temporary files that should survive app restarts
     'temp': 3, // Files that can should be deleted on app restarts
     'app-bundle': 4 // The application bundle (iOS only)

And also add convenience wrappers:
cordova.plugins.file.getDataDirectory(syncable, win)

Any comments on this?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message