michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /** michael@0: * Common front for various implementations of OS.File michael@0: */ michael@0: michael@0: if (typeof Components != "undefined") { michael@0: this.EXPORTED_SYMBOLS = ["OS"]; michael@0: Components.utils.import("resource://gre/modules/osfile/osfile_async_front.jsm", this); michael@0: } else { michael@0: // At this stage, we need to import all sources at once to avoid michael@0: // a unique failure on tbpl + talos that seems caused by a michael@0: // what looks like a nested event loop bug (see bug 794091). michael@0: #ifdef XP_WIN michael@0: importScripts( michael@0: "resource://gre/modules/workers/require.js", michael@0: "resource://gre/modules/osfile/osfile_win_back.jsm", michael@0: "resource://gre/modules/osfile/osfile_shared_front.jsm", michael@0: "resource://gre/modules/osfile/osfile_win_front.jsm" michael@0: ); michael@0: #else michael@0: importScripts( michael@0: "resource://gre/modules/workers/require.js", michael@0: "resource://gre/modules/osfile/osfile_unix_back.jsm", michael@0: "resource://gre/modules/osfile/osfile_shared_front.jsm", michael@0: "resource://gre/modules/osfile/osfile_unix_front.jsm" michael@0: ); michael@0: #endif michael@0: OS.Path = require("resource://gre/modules/osfile/ospath.jsm"); michael@0: }