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/Android$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 <[email protected]> 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 > >
