cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <mmo...@chromium.org>
Subject Re: should FileTransfer.download() auto mkdir target's path?
Date Wed, 16 Apr 2014 18:42:59 GMT
FileTransfer is supposed to be a dead simple helper, not a fundamental
system api.  So that suggests to me that we should prefer to auto-create.

-Michal


On Wed, Apr 16, 2014 at 1:57 PM, Mike Billau <mike.billau@gmail.com> wrote:

> Hello,
>
> When using FileTransfer.download(), if the target location contains folders
> that do not exist on the device, should FileTransfer auto-magically mkdir
> these folders to save the download?
>
> If target= /foo/image.png, and if /foo/ doesn't exist, Android will create
> the /foo/ dir for you. WP8 doesn't seem to do this and will instead return
> with an error. I don't know which implementation should be considered
> "correct." It seems like a "good" dev should first check that the target
> exists and create it before saving the image, but I'm all for making things
> easier for the developer and just doing it auto-magically (I hate that
> word...)
>
> I'm using 3.1 btw, sigh and sorry! Thanks everyone for your opinions.
>

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