This could be really useful -- like a mkstemp() function -- to avoid any possibility of name collision, and save the user from the hassle of managing names that they don't really care about anyway.
I wonder how many developers have had to independently implement some kind of "generate random filename; check for existing file; repeat if true" procedure just to cache files. On Thu, Dec 5, 2013 at 4:57 AM, <[email protected]> wrote: > Hi, > > I think a developer who uses FileTransfer's download does not always care > to which file the remote content is downloaded to. > > I suggest to allow a target parameter of "null" to denote some temporary > file. > > https://github.com/apache/cordova-plugin-file-transfer/blob/master/src/android/FileTransfer.java#L180 > > In the success callback the developer gets a FileEntry and can do with it > whatever is needed e.g. delete it after use. > > Do you think this is usefull for cordova user? > > - Axel > > > https://cordova.apache.org/docs/en/2.5.0/cordova_file_file.md.html#FileTransfer_download >
