cordova-plugin-file icon indicating copy to clipboard operation
cordova-plugin-file copied to clipboard

Docs: Create persistent file example provides incorrect code

Open breautek opened this issue 5 years ago • 1 comments
trafficstars

Bug Report

Problem

https://github.com/apache/cordova-plugin-file#create-a-persistent-file-

LocalFileSystem.PERSISTENT does not exists. It should be window.PERSISTENT, as confirmed by a support ticket https://github.com/apache/cordova-plugin-file/issues/369

The documentation should be updated to window.PERSISTENT. Note that, the window namespace is also used in create temporary file example

Command or Code

LocalFileSystem.PERSISTENT

Environment, Platform, Device

All platforms

Version information

cordova-plugin-file 6.0.3-dev - not sure when the documentation was written however.

Checklist

  • [x] I searched for existing GitHub issues
  • [x] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

breautek avatar Dec 22 '19 17:12 breautek

Upon further testing, I can actually confirm that both LocalFileSystem.PERSISTENT & window.PERSISTENT exists.

Still I feel like the docs should be consistent. Is there a reason why this is replicated? is window.PERSISTENT/TEMPORARY legacy?

breautek avatar Dec 22 '19 18:12 breautek