rem: /* bug 166792 added this interface in Sept. 2002, but we need to work on * older versions too. */ var nsIFileProtocolHandler; if ("nsIFileProtocolHandler" in Components.interfaces) nsIFileProtocolHandler = Components.interfaces.nsIFileProtocolHandler; else nsIFileProtocolHandler = null; 
context: function getURLSpecFromFile (file){    if (!file)        return null;    const IOS_CTRID = "@mozilla.org/network/io-service;1";    const LOCALFILE_CTRID = "@mozilla.org/file/local;1";    const nsIIOService = Components.interfaces.nsIIOService;    const nsILocalFile = Components.interfaces.nsILocalFile;    /* bug 166792 added this interface in Sept. 2002, but we need to work on     * older versions too. */    var nsIFileProtocolHandler;    if ("nsIFileProtocolHandler" in Components.interfaces)        nsIFileProtocolHandler = Components.interfaces.nsIFileProtocolHandler;    else        nsIFileProtocolHandler = null;        if (typeof file == "string")    {        var fileObj =            Components.classes[LOCALFILE_CTRID].createInstance(nsILocalFile);        fileObj.initWithPath(file);        file = fileObj;    }        var service = Components.classes[IOS_CTRID].getService(nsIIOService);    if (!nsIFileProtocolHandler)        return service.getURLSpecFromFile(file);    var fileHandler = service.getProtocolHandler("file");    fileHandler = fileHandler.QueryInterface(nsIFileProtocolHandler);    return fileHandler.getURLSpecFromFile(file);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/b0b8cec04bd582c27a41817979fe87561132d01d/venkman-utils.js/clean/extensions/venkman/resources/content/venkman-utils.js