File API Manifest

Add this to your app's manifest to enable file operations.

{
  ...
  api: {
    Object file: {
      String new,
      Array<String>: open,
      Array<String>: save,
      Object formats: {
        "format-id": Object {
          String name, 
          String extension, 
          String type,
          String accept,
          String encoding = "text",
        }
      }
    }
  }
}

File formats details:

Example

{
  ...
  "api": {
    "file": {
      "new": "text",
      "open": ["text"],
      "save": ["text"],
      "formats": {
        "text": {
          "name": "Text File",
          "extension": "txt",
          "type": "text/plain",
          "accept": "text/*"
        }
      }
    }
  }
}