On Thu, Apr 30, 2015, at 07:59 PM, Inble Visiman wrote: > Is there any way I can just dump the object which is called in a .js > file (in gecko folder) to sdcard?
In content space, with the right permissions (and a privileged/certified app) you can use the DeviceStorage API to save to the sdcard, see https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage. >From gecko chrome-privileged JS space, you can use nsIVolumeService to translate the same storage names (ex: "sdcard") to volume paths. See https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/nsIVolumeService.idl and https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/nsIVolume.idl and the use of them in the download API to map a path to something OS.File can validate (https://dxr.mozilla.org/mozilla-central/source/dom/downloads/DownloadsAPI.js#147). Andrew
_______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
