Fx60: Remove instances of nsILocalFile
nsILocalFile was merged into nsIFile, so either replace it with that or switch to Zotero.File.pathToFile().
This commit is contained in:
parent
6f965251ed
commit
433794916a
13 changed files with 36 additions and 57 deletions
|
@ -2284,7 +2284,7 @@ function ServerHandler(server)
|
|||
this._server = server;
|
||||
|
||||
/**
|
||||
* A FileMap object containing the set of path->nsILocalFile mappings for
|
||||
* A FileMap object containing the set of path->nsIFile mappings for
|
||||
* all directory mappings set in the server (e.g., "/" for /var/www/html/,
|
||||
* "/foo/bar/" for /local/path/, and "/foo/bar/baz/" for /local/path2).
|
||||
*
|
||||
|
@ -2717,7 +2717,7 @@ ServerHandler.prototype =
|
|||
*
|
||||
* @param metadata : Request
|
||||
* the Request for which a response is being generated
|
||||
* @param file : nsILocalFile
|
||||
* @param file : nsIFile
|
||||
* the file which is to be sent in the response
|
||||
* @param response : Response
|
||||
* the response to which the file should be written
|
||||
|
@ -3057,7 +3057,7 @@ ServerHandler.prototype =
|
|||
},
|
||||
|
||||
/**
|
||||
* Returns the nsILocalFile which corresponds to the path, as determined using
|
||||
* Returns the nsIFile which corresponds to the path, as determined using
|
||||
* all registered path->directory mappings and any paths which are explicitly
|
||||
* overridden.
|
||||
*
|
||||
|
@ -3067,7 +3067,7 @@ ServerHandler.prototype =
|
|||
* when the correct action is the corresponding HTTP error (i.e., because no
|
||||
* mapping was found for a directory in path, the referenced file doesn't
|
||||
* exist, etc.)
|
||||
* @returns nsILocalFile
|
||||
* @returns nsIFile
|
||||
* the file to be sent as the response to a request for the path
|
||||
*/
|
||||
_getFileForPath: function(path)
|
||||
|
@ -3432,11 +3432,11 @@ ServerHandler.prototype =
|
|||
|
||||
|
||||
/**
|
||||
* Maps absolute paths to files on the local file system (as nsILocalFiles).
|
||||
* Maps absolute paths to files on the local file system (as nsIFiles).
|
||||
*/
|
||||
function FileMap()
|
||||
{
|
||||
/** Hash which will map paths to nsILocalFiles. */
|
||||
/** Hash which will map paths to nsIFiles. */
|
||||
this._map = {};
|
||||
}
|
||||
FileMap.prototype =
|
||||
|
@ -3444,12 +3444,12 @@ FileMap.prototype =
|
|||
// PUBLIC API
|
||||
|
||||
/**
|
||||
* Maps key to a clone of the nsILocalFile value if value is non-null;
|
||||
* Maps key to a clone of the nsIFile value if value is non-null;
|
||||
* otherwise, removes any extant mapping for key.
|
||||
*
|
||||
* @param key : string
|
||||
* string to which a clone of value is mapped
|
||||
* @param value : nsILocalFile
|
||||
* @param value : nsIFile
|
||||
* the file to map to key, or null to remove a mapping
|
||||
*/
|
||||
put: function(key, value)
|
||||
|
@ -3461,12 +3461,12 @@ FileMap.prototype =
|
|||
},
|
||||
|
||||
/**
|
||||
* Returns a clone of the nsILocalFile mapped to key, or null if no such
|
||||
* Returns a clone of the nsIFile mapped to key, or null if no such
|
||||
* mapping exists.
|
||||
*
|
||||
* @param key : string
|
||||
* key to which the returned file maps
|
||||
* @returns nsILocalFile
|
||||
* @returns nsIFile
|
||||
* a clone of the mapped file, or null if no mapping exists
|
||||
*/
|
||||
get: function(key)
|
||||
|
@ -5330,7 +5330,7 @@ function server(port, basePath)
|
|||
if (basePath)
|
||||
{
|
||||
var lp = Cc["@mozilla.org/file/local;1"]
|
||||
.createInstance(Ci.nsILocalFile);
|
||||
.createInstance(Ci.nsIFile);
|
||||
lp.initWithPath(basePath);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue