B2G/gecko/toolkit/mozapps/update/test/shared.js
/**
 * Reads the current update operation/state in a file in the patch
 * directory.
 *
 * @param  aFile (optional)
 *         nsIFile to read the update status from. If not provided the
 *         application's update status file will be used.
 * @return The status value.
 */
Reads the current update operation/state in a file in the patch
directory.

@param  aFile (optional)
nsIFile to read the update status from. If not provided the
application's update status file will be used.
@return The status value.
Reads the current update operation / state in a file in the patch directory . @param aFile ( optional ) nsIFile to read the update status from . If not provided the application ' s update status file will be used . @return The status value .
function readStatusFile(aFile) {
  var file;
  if (aFile) {
    file = aFile.clone();
    file.append(FILE_UPDATE_STATUS);
  }
  else {
    file = getUpdatesDir();
    file.append("0");
    file.append(FILE_UPDATE_STATUS);
  }
  return readFile(file).split("\n")[0];
}
function readStatusFile ( aFile ) { var file ; if ( aFile ) { file = aFile . clone ( ) ; file . append ( FILE_UPDATE_STATUS ) ; } else { file = getUpdatesDir ( ) ; file . append ( "0" ) ; file . append ( FILE_UPDATE_STATUS ) ; } return readFile ( file ) . split ( "\n" ) [ 0 ] ; }
Reads the current update operation/state in a file in the patch
 directory.
Reads the current update operation / state in a file in the patch directory .