0

I am new to webextensions, and I am having trouble following the documentation.

What is the way to access file metadata such as file size for a file stored on disk?

I see there is Mozilla documentation on OS.File modules, with features such as OS.File.Info, OS.File.Error, and OS.Path, which look like they would be exactly what is necessary, but it is not clear from the documentation whether use of these is being deprecated, or is instead being carried over into webextensions.

If methods using these are in fact appropriate going forward with webextensions, can someone explain (or point me to documentation on) how to import or access the modules for use in a background script?

A stackoverflow Q/A from a year ago seems to indicate that the modules are being deprecated, but maybe webextensions functionality has improved since then?

Community
  • 1
  • 1
Cam U
  • 340
  • 3
  • 10
  • 1
    Yes, OS.File is for other Firefox add-on types, not WebExtensions. OS.File is being deprecated. It is unclear what, if anything, will be provided for WebExtensions for file access. My understanding is that access to arbitrary files will not be permitted. WebExtensions are much, much less capable than other add-on types. There are, and will continue to be, very significant limitations on what will be possible. WebExtensions are similar in capability to Chrome extensions, but with some interfaces not yet supported. The plan is that there will be some capabilities beyond what Chrome permits. – Makyen Jan 19 '17 at 11:51
  • @Makyen Thanks for the info. – Cam U Jan 19 '17 at 12:33

0 Answers0