Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C99F610128 for ; Mon, 16 Dec 2013 09:33:07 +0000 (UTC) Received: (qmail 87411 invoked by uid 500); 16 Dec 2013 09:33:07 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 87212 invoked by uid 500); 16 Dec 2013 09:33:03 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 87204 invoked by uid 99); 16 Dec 2013 09:33:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Dec 2013 09:33:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tommy@devgeeks.org designates 209.85.212.181 as permitted sender) Received: from [209.85.212.181] (HELO mail-wi0-f181.google.com) (209.85.212.181) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Dec 2013 09:32:57 +0000 Received: by mail-wi0-f181.google.com with SMTP id hq4so1803605wib.14 for ; Mon, 16 Dec 2013 01:32:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=X4iWiTV0B/lxp9M8gU/6SeHqd+ct8Js5yRYwy9P/LRw=; b=PVBM3jiXUsu+WbAJLGwYs0UPEiovWu++MfGlWoOu2CndrWhDxjzM6pdHUNDkg0Qky7 raP2Jto9F+rqBwm0jZVz7QhbqXYGYcMzJS8uRqLKlo7qJE8zprojudYBJIA/1UoCXhfo QSDNJgqIKlR4xGZJDzTj3+EY/eSZYMgXXEH526GbJ+GzdglXy5te+yBt0Uz/ACBUzyDP c+K/tz2acbsaGJmAw0bOmFaVDp8aoV4D9QEJ8hQ73Z7Ot4oIMLaE4lTBX9K6IRUdaJbf 0M+OmGrzi55vM4SK9GxrBcYvt0spps/0OqYGoTisKZGFO54j/LcMTbN8HQiSJxq03kmG oETA== X-Gm-Message-State: ALoCoQnrvNcP8x8vVePe1dqgprJRsnhSI/vfyEQsOap0LRAyPxdcGcjvctuKCRbK7+QhDak9cun0 MIME-Version: 1.0 X-Received: by 10.180.182.136 with SMTP id ee8mr12416469wic.19.1387186356312; Mon, 16 Dec 2013 01:32:36 -0800 (PST) Received: by 10.180.36.35 with HTTP; Mon, 16 Dec 2013 01:32:36 -0800 (PST) X-Originating-IP: [101.173.213.62] Received: by 10.180.36.35 with HTTP; Mon, 16 Dec 2013 01:32:36 -0800 (PST) In-Reply-To: References: Date: Mon, 16 Dec 2013 20:32:36 +1100 Message-ID: Subject: Re: New and/or improved file plugin From: Tommy Williams To: dev@cordova.apache.org Content-Type: multipart/alternative; boundary=089e016346b401953d04eda37ed4 X-Virus-Checked: Checked by ClamAV on apache.org --089e016346b401953d04eda37ed4 Content-Type: text/plain; charset=ISO-8859-1 Ian, Congrats on getting this over the line! We have a *very* file/file-transfer dependent app. I will be keen to change it over to using this and see how we go. :) Has file transfer been updated to play nicely with it? If so, were there many big changes to file-transfer? Again, congrats for tackling a sleeping bear no one wanted to wake ;) - tommy On 16/12/2013 6:38 pm, "Brian LeRoux" wrote: > thx so much for tackling this Ian, its a super complex part of the story. > > will dig in over the break / hopefully you are now taking a break! > > > On Mon, Dec 16, 2013 at 4:38 PM, Ian Clelland >wrote: > > > On Friday I finally committed the Android changes and the last of the iOS > > changes to the file plugin to the dev branch of cordova-plugin-file. > > > > For those of you who haven't been following along, there are two big > > changes in this release: > > > > > > 1. The plugin is now modular; code that handles regular files on the > > filesystem is now separate from code that handles e.g., app assets. > > 2. FileEntry objects now use a new URL scheme: > > filesystem://localhost//. 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). > > > > For app developers: > > > > > > - If you have previously been storing file:/// urls on the device, and > > those files exist *outside* of the standard filesystem roots, (this > > should > > only be the case if you are manipulating the URLs that the File plugin > > sends back,) those URLs will almost certainly not work with filesystem > > operations in this new version. (For instance, you may still be able > to > > set > > them as image sources, etc, but you won't be able to create readers or > > writers to them with the File API) > > - If you have been storing file:/// URLs that exist within the normal > > (temporary, persistent) filesystems, then they probably still work, as > > long > > as you are calling window.resolveLocalFileSystemURI on them to get > > FileEntries. You may find that they need to be converted to the new > > filesystem:// scheme for some operations -- if you do, then just call > > resolveLocalFileSystemURI on them, and use .toURL() on the entry that > > you > > get back. > > - If you just use window.requestFilesystem(), and traverse the > > filesystem from there, then you should see no changes at all. The > values > > you will see if you call toURL() on any of the FileEntry or > > DirectoryEntry > > objects will be different than before, but will be accepted by any of > > the > > filesystem methods that take URLs. > > > > For cordova developers: > > > > I'm sure that, despite passing all of the original tests, and the tests > > that I've added, there are still some bugs lurking somewhere. If you have > > apps that use File or FileTransfer, please take some time to try them out > > with the dev version of File, and report any bugs that you find. > > > > Thanks! > > > > Ian > > > --089e016346b401953d04eda37ed4--