cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: [file plugin] Accessing physical device paths
Date Fri, 28 Feb 2014 17:14:57 GMT
Thanks for the feedback! I believe Ian's come to the same conclusion (that
we should be exposing this functionality), and is working on exposing it.


On Fri, Feb 28, 2014 at 11:22 AM, Anthony Rumsey <arumsey@adobe.com> wrote:

> Hi there Cordova devs!
>
> The release of version 1.0 of the file plugin obviously changed the
> behaviour of a majority of its API in order to be better aligned with the
> W3C file spec.  As an app developer at Adobe and user of this plugin the
> abstraction of device paths to filesystem URLs is great in order to get
> consistent behaviour across devices.  On the other hand there are cases
> when a lament the loss of having access to actual device paths.  Is it not
> possible to to have the best opt both worlds and allow the file plugin to
> convert file entry URLs to local paths when desired?
>
> Wait a second! There is an internal method already that provides
> thisÅ "_getLocalFilesystemPath"!!
>
> I know there has been lengthy discussion on this topic in the past but
> what was the final reason for hiding this functionality?
>
> Now for some context on my use case.
>
> In the process of upgrading an app I'm working on to use file-plugin 1.0 I
> ran across 2 cases where I needed an actual local filesystem path.  First,
> the app downloads ZIP files from a server and then unzips them on the
> device to persistent storage. The zip plugin in this case expects local
> file system paths as its source and destination.  Maybe the solution to
> this usage would be for the zip plugin to support filesystem URLs.  Fair
> enough but that isn't the case today.  Second, once the zip content is
> stored I then want to redirect my web view to that location.  With the
> testing I did there didn't seem to be a way to redirect to a filesystem
> URL using 'window.location.href'.
>
> In both cases, since '_getLocalFilesystemPath' exists, I have resorted to
> calling 'window.cordova.exec(success, fail, "File",
> "_getLocalFilesystemPath", [url]);' in order to get the desired path.
>
> Thanks,
> Anthony
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message