incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <...@adobe.com>
Subject Re: More issue gardening discussion: app root path
Date Fri, 22 Jun 2012 19:56:05 GMT
Also the protocol-based approach kind of lets us sidestep the issue of
following specs or not.

In the end the W3C file api's goals do not necessarily cover all of
cordova's use cases. I think it would be OK to roll with the
protocol-based approach (I actually like it).

On 6/22/12 12:53 PM, "Filip Maj" <fil@adobe.com> wrote:

>Thanks for pointing that out.
>
>APIs will get revisited post-2.0, but this is something that the framework
>needs to provide IMO. I don't really care _how_ it does it, that's a
>subjective discussion / more a matter of preference.
>
>Simon, why would it have to be read-only? Can we not programmatically
>write to the www folder on some platforms?
>
>On 6/22/12 12:46 PM, "Simon MacDonald" <simon.macdonald@gmail.com> wrote:
>
>>We floated this idea out once upon a time. The best resource I could find
>>on it was:
>>
>>https://groups.google.com/forum/?fromgroups#!searchin/phonegap-dev/Androi
>>d
>>$20media$20question/phonegap-dev/5_eneTcPBYg/nItMozwh8QoJ
>>
>>There are a number of practical concerns when it comes to implementing
>>this
>>however. On all of the platforms the APPLICATION file system would be
>>read
>>only which could cause some confusion among developers who want to write
>>files into this file system. IIRC Justin did not find a way to list all
>>of
>>the assets on BB. That may have changed with the some of the more recent
>>OS
>>versions though.
>>
>>Way back in PG 1.1 I had the stubs for an APPLICATION and RESOURCE
>>filesystem in the code but it was shot down at that point as it did not
>>follow the W3C spec.
>>
>>Simon Mac Donald
>>http://hi.im/simonmacdonald
>>
>>
>>On Mon, Jun 11, 2012 at 7:54 PM, Filip Maj <fil@adobe.com> wrote:
>>
>>> Reference issue: https://issues.apache.org/jira/browse/CB-285
>>>
>>> TL;DR: how can I reference in-app (inside the www folder) resources in
>>>a
>>> cross-platform way? For example, packaged .mp3 file, for use in Media.
>>>
>>> Some contributors recommend parsing location.href, but this is brittle
>>>and
>>> does not work on all platforms.
>>>
>>> My proposal: add a new constant to the LocalFileSystem object [1]
>>> representing the application root (e.g. APPLICATION). Users could then:
>>>
>>> function onSuccess(fileSystem) {
>>>    console.log(fileSystem.name);
>>> }
>>>
>>> // request the file system of the app package www folder
>>> window.requestFileSystem(LocalFileSystem.APPLICATION, 0, onSuccess,
>>> onError);
>>>
>>>
>>> Thoughts?
>>>
>>> [1]
>>> 
>>>http://docs.phonegap.com/en/1.8.0/cordova_file_file.md.html#LocalFileSys
>>>t
>>>em
>>>
>>>
>


Mime
View raw message