FileAccess, v1.0.11
Access the contents of files that the user has selected.
Other Versions
2.0.1, 1.0.11, 1.0.9, 1.0.8, 1.0.6, 1.0.5
BrowserPlus.FileAccess.Read({params}, function{}())
Read up to 2mb of a file on disk. You may specify offset and length.
Test: Read()
Parameters
- file: path
- The file that you would like to read.
- offset: integer (Optional)
- The option byte offset at which you like to start reading.
- size: integer (Optional)
- The amount of data to read in bytes
BrowserPlus.FileAccess.GetURL({params}, function{}())
Get a localhost url that can be used to attain the full contents of a file on disk. The URL will be of the form http://127.0.0.1:<port>/<uuid> -- The port will be an ephemerally bound port, the uuid will be a traditional GUID. When a local client accesses the URL, the FileAccess service will ignore any appended pathing (i.e. for http://127.0.0.1:<port>/<uuid>/foo.tar.gz, '/foo.tar.gz' will be ignored). This allows client code to supply a filename when triggering a browser supplied 'save as' dialog.
Test: GetURL()
Parameters
- file: path
- The file that you would like to read via a localhost url.


