B2G/gecko/toolkit/mozapps/update/nsUpdateService.js
/**
#  Writes the update's application version to a file in the patch directory. If
#  the update doesn't provide application version information via the
#  appVersion attribute the string "null" will be written to the file.
#  This value is compared during startup (in nsUpdateDriver.cpp) to determine if
#  the update should be applied. Note that this won't provide protection from
#  downgrade of the application for the nightly user case where the application
#  version doesn't change.
#  @param   dir
#           The patch directory where the update.version file should be
#           written.
#  @param   version
#           The version value to write. Will be the string "null" when the
#           update doesn't provide the appVersion attribute in the update xml.
 */
Writes the update's application version to a file in the patch directory. If
the update doesn't provide application version information via the
appVersion attribute the string "null" will be written to the file.
This value is compared during startup (in nsUpdateDriver.cpp) to determine if
the update should be applied. Note that this won't provide protection from
downgrade of the application for the nightly user case where the application
version doesn't change.
Writes the update ' s application version to a file in the patch directory . If the update doesn ' t provide application version information via the appVersion attribute the string " null " will be written to the file . This value is compared during startup ( in nsUpdateDriver . cpp ) to determine if the update should be applied . Note that this won ' t provide protection from downgrade of the application for the nightly user case where the application version doesn ' t change .
function writeVersionFile(dir, version) {
  var versionFile = dir.clone();
  versionFile.append(FILE_UPDATE_VERSION);
  writeStringToFile(versionFile, version);
}
function writeVersionFile ( dir , version ) { var versionFile = dir . clone ( ) ; versionFile . append ( FILE_UPDATE_VERSION ) ; writeStringToFile ( versionFile , version ) ; }
Writes the update's application version to a file in the patch directory.
Writes the update ' s application version to a file in the patch directory .