FileUtils and DirUtils no longer working in TB 38.0.1

Talk about add-ons and extension development.
Post Reply
Kukulkano
Posts: 8
Joined: July 3rd, 2015, 3:55 am

FileUtils and DirUtils no longer working in TB 38.0.1

Post by Kukulkano »

Hello,

we did an AddIn including jslib like this:

Code: Select all

include('chrome://companyAddon/content/jslib/io/filesystem.js');
include('chrome://companyAddon/content/jslib/io/io.js');
include('chrome://companyAddon/content/jslib/io/rdf.js');
include('chrome://companyAddon/content/jslib/io/dir.js');
include('chrome://companyAddon/content/jslib/io/file.js');
include("chrome://companyAddon/content/jslib/io/fileUtils.js");
include("chrome://companyAddon/content/jslib/io/dirUtils.js");
include("chrome://companyAddon/content/jslib/utils/system.js");

// ... later in function ...

/* the language file is now encoded in utf 8 */
var fu = new FileUtils; // <- ERROR COMES UP HERE
var path = fu.chromeToPath("chrome://companyAddon/content/regify_addin_lng.csv");
var file = Cc[RF_FILE_LOCAL].createInstance(Ci.nsILocalFile);
file.initWithPath(path);

This worked fine until 31.7. Sadly, since updating to 38.0.1, the JS console returns

Code: Select all

Zeitstempel: 03.07.2015 12:59:17
Fehler: TypeError: FileUtils is not a constructor
Quelldatei: chrome://companyAddon/content/modules.js
Zeile: 394


Also, other jslib objects like DirUtils etc are also not available any more.

Does somebody know what happened and where I should start my search? Some known incompatibility?

Kukulkano
lithopsian
Posts: 3664
Joined: September 15th, 2010, 9:03 am

Re: FileUtils and DirUtils no longer working in TB 38.0.1

Post by lithopsian »

Is jslib even alive any more?
Noitidart
Posts: 1168
Joined: September 16th, 2007, 8:01 am

Re: FileUtils and DirUtils no longer working in TB 38.0.1

Post by Noitidart »

I would recommend using OS.File over all of these
Post Reply