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 311701076C for ; Mon, 16 Dec 2013 12:34:42 +0000 (UTC) Received: (qmail 53777 invoked by uid 500); 16 Dec 2013 12:34:41 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 53741 invoked by uid 500); 16 Dec 2013 12:34:41 -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 53732 invoked by uid 99); 16 Dec 2013 12:34:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Dec 2013 12:34:41 +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 (nike.apache.org: domain of iclelland@google.com designates 209.85.219.46 as permitted sender) Received: from [209.85.219.46] (HELO mail-oa0-f46.google.com) (209.85.219.46) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Dec 2013 12:34:35 +0000 Received: by mail-oa0-f46.google.com with SMTP id o6so4863859oag.5 for ; Mon, 16 Dec 2013 04:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=sdoE9VLiT6Dftu0+wAUvXoyV3Y+Le/646DTN3/kZ6O8=; b=Ax7Q8ciVY+knp4c2Y3aWlVD6ecSSwpSF9VJvbVtSI63ACWHspH4H8yIP1FIg1DZ36E gFTRyNFH1cS4pVwoyPhmNYYUD5tRwB0+OZGwHkjLgHKAxnR3jh8NvkZSID4EsuKsatD1 20bKbEcD0CJvtN2CXjn+Hyf7+fA2dYLbIB4HpCw37rFXQNRYcF61AKthV/JWosbNsDev 8MhduEUUCBXDNP3Hy9agZq5NLRZmteWGGrmHiX4MaM/fnZ7YfS7edLxzuSxJO+cgA6iL eGUf3jgRMypTi5rtspHvMtWv51zylC15EEgwgJ1Ck5nnSbsAgXgY9k0iM0nfk8d93oQf 5/YQ== 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:from:date :message-id:subject:to:content-type; bh=sdoE9VLiT6Dftu0+wAUvXoyV3Y+Le/646DTN3/kZ6O8=; b=QK/G6LvqHmF9V7F3yfjUNFN9+HLlRBcu6WtZsIuDrS39iyhr6ZQ/28kSVS53oArKEA lIzhwJQkJnxCCHFdmidEZlQajwmjm9TJdnXumNZO5F20/jKHTnlD6nCc9tXcYUY3/dvo wbCTfT7pvpv9RgFwPfnhLMpPB42Vt1xyNXmSAIbj5Fbcwo0wGao7vlrnzYf/mOaa1vJw T56EondovIQczznrvUH1c8pbodhlW9OXFKqr2JwDCTgg3MzAhhf+dT0dqolYZVPyjoBD ufwgy8G+DbzlT010nDX428OTv+X5snzQ2cImd123gWvAodj7s+teLHVoxecRjMHdP8hi hOtQ== X-Gm-Message-State: ALoCoQnZyiHhiznNqbUbaA71sMH0pUWMGYPFxuLF3KnJPd3uY5JiXVN3tccnJZomqZU3tjX0Anxk6JyZ2ixUSKEC8OphIal5qR0jMmk0qecQA443upNRx4mXnKY9spa4X/NVfOrzedv/UTt8rEAYPdbsbTJjmsLfREEdldcpjzJhc7nMAAaPHPLbXJeOIHpn0+iw57WsdA9zZd6PhG0Dqu5EqV21AvgV8A== X-Received: by 10.60.155.135 with SMTP id vw7mr11276642oeb.9.1387197254406; Mon, 16 Dec 2013 04:34:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.225.135 with HTTP; Mon, 16 Dec 2013 04:33:54 -0800 (PST) In-Reply-To: References: From: Ian Clelland Date: Mon, 16 Dec 2013 07:33:54 -0500 Message-ID: Subject: Re: New and/or improved file plugin To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=047d7bd767209523aa04eda60761 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bd767209523aa04eda60761 Content-Type: text/plain; charset=UTF-8 On Mon, Dec 16, 2013 at 4:32 AM, Tommy Williams wrote: > 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? > Yeah, file-transfer was one of the hairier parts of this bear -- the latest dev version of file-transfer should work with *both* the new and old versions of file; I've been running all of the unit tests against both versions. On iOS, the changes were to file-transfer itself (647dad7 has the most recent changes), but it recognizes both old (paths) and new (URLs) and deals with them correctly. On Android, the CordovaResourceAPI library made it easier; the File plugin just takes care of everything. > Again, congrats for tackling a sleeping bear no one wanted to wake ;) > Thanks :) Ian > > - 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 > > > > > > --047d7bd767209523aa04eda60761--