Regarding file access permissions:
- The plugin has read, write, and delete access to its private directory by default:
/data/data/com.ratta.supernote.pluginhost/files/plugins/<pluginID>. - None of the read, write, or delete permissions are granted by default for the
Document,EXPORT,INBOX,MyStyle,Note, andSCREENSHOTdirectories under shared storage (sdcard); each must be requested separately viaplugin.permission.FILE:READ,plugin.permission.FILE:WRITE, andplugin.permission.FILE:DELETE. External SD cards, OTG storage, and other removable storage are likewise governed by these same permissions. Any other directory cannot be read, written, or deleted regardless of whether the corresponding permission is requested.
Promise<number>: returns the permission status, where0means the permission is not granted and cannot be used;1means the permission is granted and can be used
- Throws a parameter validation error when
permissionis not a non-empty string - Throws an error when
permissionis not in the supported list (error code1502)