ElasticWolf.app/Contents/Frameworks/XUL.framework/Versions/13.0/components/nsUpdateService.js
/**
 * Reads a string of text from a file.  A trailing newline will be removed
 * before the result is returned.  This function only works with ASCII text.
 */
Reads a string of text from a file.  A trailing newline will be removed
before the result is returned.  This function only works with ASCII text.
Reads a string of text from a file . A trailing newline will be removed before the result is returned . This function only works with ASCII text .
function readStringFromFile(file) {
  if (!file.exists()) {
    LOG("readStringFromFile - file doesn't exist: " + file.path);
    return null;
  }
  var fis = Cc["@mozilla.org/network/file-input-stream;1"].
            createInstance(Ci.nsIFileInputStream);
  fis.init(file, FileUtils.MODE_RDONLY, FileUtils.PERMS_FILE, 0);
  return readStringFromInputStream(fis);
}
function readStringFromFile ( file ) { if ( ! file . exists ( ) ) { LOG ( "readStringFromFile - file doesn't exist: " + file . path ) ; return null ; } var fis = Cc [ "@mozilla.org/network/file-input-stream;1" ] . createInstance ( Ci . nsIFileInputStream ) ; fis . init ( file , FileUtils . MODE_RDONLY , FileUtils . PERMS_FILE , 0 ) ; return readStringFromInputStream ( fis ) ; }
Reads a string of text from a file.
Reads a string of text from a file .