diff --git a/components/greasemonkey.js b/components/greasemonkey.js index df27611dd..4ca3ac1ae 100644 --- a/components/greasemonkey.js +++ b/components/greasemonkey.js @@ -62,7 +62,7 @@ var gStringBundle = Components .createBundle("chrome://greasemonkey/locale/greasemonkey.properties"); var gTmpDir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) - .get("TmpD", Components.interfaces.nsILocalFile); + .get("TmpD", Components.interfaces.nsIFile); /////////////////////// Component-global Helper Functions ////////////////////// diff --git a/content/third-party/mpl-utils.js b/content/third-party/mpl-utils.js index 1c2760280..f915f6557 100644 --- a/content/third-party/mpl-utils.js +++ b/content/third-party/mpl-utils.js @@ -34,7 +34,7 @@ Contributor(s): function GM_openFolder(aFile) { try { // Show the directory containing the file and select the file. - aFile.QueryInterface(Components.interfaces.nsILocalFile).reveal(); + aFile.QueryInterface(Components.interfaces.nsIFile).reveal(); } catch (e) { // Either the file doesn't exist or reveal is not implemented var fParent = aFile.parent; diff --git a/modules/remoteScript.js b/modules/remoteScript.js index ea508243b..ccc350384 100644 --- a/modules/remoteScript.js +++ b/modules/remoteScript.js @@ -303,7 +303,7 @@ RemoteScript.prototype.install = function(aOldScript, aOnlyDependencies) { // Just move the dependencies in. var enumerator = this._tempDir.directoryEntries; while (enumerator.hasMoreElements()) { - var file = enumerator.getNext().QueryInterface(Ci.nsILocalFile); + var file = enumerator.getNext().QueryInterface(Ci.nsIFile); // TODO: Fix invalid private access. file.moveTo(this.script._basedirFile, null); } @@ -482,11 +482,11 @@ RemoteScript.prototype._downloadDependencies = function(aCompletionCallback) { uri, file, GM_util.hitch(this, dependencyDownloadComplete)); }; -/** Download a given nsIURI to a given nsILocalFile, with optional callback. */ +/** Download a given nsIURI to a given nsIFile, with optional callback. */ RemoteScript.prototype._downloadFile = function( aUri, aFile, aCompletionCallback) { aUri = aUri.QueryInterface(Ci.nsIURI); - aFile = aFile.QueryInterface(Ci.nsILocalFile); + aFile = aFile.QueryInterface(Ci.nsIFile); aCompletionCallback = aCompletionCallback || function() {}; assertIsFunction(aCompletionCallback, '_downloadFile() completion callback is not a function.'); diff --git a/modules/scriptDependency.js b/modules/scriptDependency.js index 9d93b64d2..f7ead8ba0 100644 --- a/modules/scriptDependency.js +++ b/modules/scriptDependency.js @@ -22,7 +22,7 @@ ScriptDependency.prototype = { }, setFilename: function(aFile) { - aFile.QueryInterface(Components.interfaces.nsILocalFile); + aFile.QueryInterface(Components.interfaces.nsIFile); this._filename = aFile.leafName; }, diff --git a/modules/util/getEditor.js b/modules/util/getEditor.js index 95a9f4ef8..3360dd4e2 100644 --- a/modules/util/getEditor.js +++ b/modules/util/getEditor.js @@ -15,7 +15,7 @@ function getEditor(change) { var editor; try { editor = Components.classes["@mozilla.org/file/local;1"] - .createInstance(Components.interfaces.nsILocalFile); + .createInstance(Components.interfaces.nsIFile); editor.followLinks = true; editor.initWithPath(editorPath); } catch (e) { diff --git a/modules/util/getTempDir.js b/modules/util/getTempDir.js index fa3dd2c08..161f96419 100644 --- a/modules/util/getTempDir.js +++ b/modules/util/getTempDir.js @@ -2,10 +2,10 @@ Components.utils.import('resource://greasemonkey/constants.js'); const EXPORTED_SYMBOLS = ['getTempDir']; -const DIRECTORY_TYPE = Components.interfaces.nsILocalFile.DIRECTORY_TYPE; +const DIRECTORY_TYPE = Components.interfaces.nsIFile.DIRECTORY_TYPE; const TMP_DIR = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) - .get("TmpD", Components.interfaces.nsILocalFile); + .get("TmpD", Components.interfaces.nsIFile); function getTempDir(aRoot) { var file = (aRoot || TMP_DIR).clone(); diff --git a/modules/util/getTempFile.js b/modules/util/getTempFile.js index 4c6480019..631fff16b 100644 --- a/modules/util/getTempFile.js +++ b/modules/util/getTempFile.js @@ -2,10 +2,10 @@ Components.utils.import('resource://greasemonkey/constants.js'); const EXPORTED_SYMBOLS = ['getTempFile']; -const NORMAL_FILE_TYPE = Components.interfaces.nsILocalFile.NORMAL_FILE_TYPE; +const NORMAL_FILE_TYPE = Components.interfaces.nsIFile.NORMAL_FILE_TYPE; const TMP_DIR = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) - .get("TmpD", Components.interfaces.nsILocalFile); + .get("TmpD", Components.interfaces.nsIFile); function getTempFile(aRoot, aLeaf) { var file = (aRoot || TMP_DIR).clone(); diff --git a/modules/util/openInEditor.js b/modules/util/openInEditor.js index d7ee0148b..123a1b7e3 100644 --- a/modules/util/openInEditor.js +++ b/modules/util/openInEditor.js @@ -27,7 +27,7 @@ function openInEditor(script) { if ("Darwin"==xulRuntime.OS) { args = ["-a", editor.path, script.file.path]; editor = Components.classes["@mozilla.org/file/local;1"] - .createInstance(Components.interfaces.nsILocalFile); + .createInstance(Components.interfaces.nsIFile); editor.followLinks = true; editor.initWithPath("/usr/bin/open"); } diff --git a/modules/util/scriptDir.js b/modules/util/scriptDir.js index 2848f24e6..6e21c6802 100644 --- a/modules/util/scriptDir.js +++ b/modules/util/scriptDir.js @@ -5,7 +5,7 @@ const EXPORTED_SYMBOLS = ['scriptDir']; const SCRIPT_DIR = Components .classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) - .get("ProfD", Components.interfaces.nsILocalFile); + .get("ProfD", Components.interfaces.nsIFile); SCRIPT_DIR.append("gm_scripts"); function scriptDir() { diff --git a/modules/util/writeToFile.js b/modules/util/writeToFile.js index 07f93f748..2bad1dc3e 100644 --- a/modules/util/writeToFile.js +++ b/modules/util/writeToFile.js @@ -3,7 +3,7 @@ Components.utils.import('resource://greasemonkey/constants.js'); const EXPORTED_SYMBOLS = ['writeToFile']; -const NORMAL_FILE_TYPE = Components.interfaces.nsILocalFile.NORMAL_FILE_TYPE; +const NORMAL_FILE_TYPE = Components.interfaces.nsIFile.NORMAL_FILE_TYPE; // PR_WRONLY PR_CREATE_FILE PR_TRUNCATE const STREAM_FLAGS = 0x02 | 0x08 | 0x20;