4.0 File I/O

In many cases, your plugin may need to create, read, and write files on the user’s persistent storage mediums. Your plugin should be respectful of the fact that it has access to a lot of potentially privileged information and should respect the user’s privacy. The plugin should also be mindful of not wasting a lot of space.

4.1 Handle I/O Exceptions

There may well be cases when your File I/O attempt will fail. Your plugin should always handle the exceptions gracefully.

4.2 Respect the user’s disk space

4.3 Don’t store sensitive information on the user’s disk

Although plugin’s can’t access other plugin data without the user first giving permission, the files that you store are themselves accessible to other applications running on your user’s machine. This means that if you were to save a user’s password to the file system, that password would now be accessible to any other application running on the machine.

4.4 Never access user files without permission

Although the File I/O API surface makes it difficult to access files outside of the plugin data folder and temporary folder without the user first providing some sort of permission using a file picker, it is incumbent upon your plugin to ensure that it doesn’t circumvent the user’s permissions to do so.