I've taken a first pass at the file plugin (I'll probably revisit it in the
morning and think it's terrible :) )

On Thu, Feb 6, 2014 at 4:44 PM, Steven Gill <stevengil...@gmail.com> wrote:

> Okay, I have a blog post ready to review. I could use some help with adding
> more content about the file plugin release. I got most of my info for it
> from http://markmail.org/thread/ebm3ms6of24rhyvb.
>
> I have also gone through the commits and removed ones I thought were
> unimportant. If you feel more curating needs to be done, feel free to edit.
>


The most noticeable changes in this release are to the File plugin. It has
been revamped to use a new URL scheme
`cdvfile://localhost/<filesystemType>/<path to file>`. These URLs are
generated by all file operations, and are passed over the bridge to native
code. (This is in contrast to the previous version, which passed around
absolute paths on the device filesystem).

Most of these changes are to bring us more in line with the HTML Filesystem
standard, although they will also allow us to extend the filesystem
abstraction
 to cover new kinds of storage, both internal and external to devices.

Other changes include:
  * The file plugin is now much more modular. The "Filesystem" is now an
    abstract class that developers can subclass to write their own
filesystem
    types.
  * Developers can use the existing filesystem types, or new types, to
    provide new filesystem roots for their applications. (No longer limited
to
    just persistent and temporary, or just a single directory for storage.)
  * Filesystem URLs paths are now relative to the filesystem root, helping
    to sandbox the filesystems and keep applications from stepping on
    each others' toes.
  * Application developers can now configure the file plugin to use a more
    sensible location for storing persistent files. On iOS, this means
storing
    files in the Library directory, rather than the Documents directory. On
    Android, it means using the application's internal storage directory
rather
    than the SD card partition. See the README file for information on
    configuring your applications.
  * Several other bugs have been fixed, and our test coverage has increased.


[Much curating of file changes; too many commits for the number of issues
fixed ;) ]


> `org.apache.cordova.file`
> * CB-5974: Use safe 'Compatibility' mode by default
> * CB-5915: Add option for new persistent storage location for iOS

* CB-5916: Add option for new persistent storage location for Android

> * Add default FS root to new FS objects
> * CB-5899: Make DirectoryReader.readEntries return properly formatted Entry
> objects
> * Add constructor params to FileUploadResult related to CB-2421
> * Fill out filesystem attribute of entities returned from
> resolveLocalFileSystemURL
> * Android: Expose filePlugin getter so that other plugins can register
> filesystems
> * Add backwards-compatibility shim for file-transfer
> * Android: Allow third-party plugin registration
> * CB-5810 [BlackBerry10] resolve local:/// paths (application assets)
> * CB-5774: create DirectoryEntry instead of FileEntry
> * Initial fix for CB-5747: Windows 8: DirectoryEntry.getDirectory fails
> when path contains directory separator
> * Android: Allow absolute paths on Entry.getFile / Entry.getDirectory
> * CB-5008: Rename resolveLocalFileSystemURI to resolveLocalFileSystemURL
> * CB-4899 [BlackBerry10] Fix resolve directories
> * CB-5602 Windows8. Fix File Api mobile spec tests
> * Android: Better support for content urls and cross-filesystem copy/move
> ops
> * CB-5699 [BlackBerry10] Update resolveLocalFileSystemURI implementation
> * CB-5658 Update license comment formatting of doc/index.md
> * CB-5658 Add doc.index.md for File plugin.
> * CB-5658 Delete stale snapshot of plugin docs
> * CB-5403: Backwards-compatibility with file:// urls where possible
> * Android: Clean up unclosed file objects
> * Log file path for File exceptions.
> * CB-5532 WP8. Add binary data support to FileWriter
> * CB-5531 WP8. File Api readAsText incorrectly handles position args
> * Added ubuntu platform support
> * Added amazon-fireos platform support
> * CB-5118 [BlackBerry10] Add check for undefined error handler
> * CB-5403: Bump File plugin major version
> * CB-5408: Add handler for filesystem urls
> * CB-5407: Update Android native code to use filesystem URLs internally
> * CB-5406: Update iOS native code to use filesystem URLs internally
> * CB-5405: Update JS code to use URLs exclusively
> * CB-4816 Fix file creation outside sandbox for BB10
>

Reply via email to