This information is outdated as of now, but cannot be deleted.
You can create File
instances just by specifying a path when your code is chrome-privileged:
new File("/path/to/file");
File
is a sub-class of Blob
, so all File
instances are also valid Blob
s.
Please note that this requires a platform path, and not a file URL.
Yes, FileReader
is available to addons.
File
and FileReader
are available in all window
s. If you want to use them in a non-window scope (like bootstrap.js
or a code module), you may use nsIDOMFile
/nsIDOMFileReader
.