incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <shaz...@gmail.com>
Subject Re: More issue gardening discussion: app root path
Date Tue, 12 Jun 2012 00:01:21 GMT
+ I like it

On Mon, Jun 11, 2012 at 4: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#LocalFileSystem
>

Mime
View raw message