B2G/gecko/toolkit/mozapps/update/nsUpdateService.js
/**
 * Creates a link file, which allows the actual patch to live in
 * a directory different from the update directory.
 * @param   dir
 *          The patch directory where the update.link file
 *          should be written.
 * @param   patchFile
 *          The fully qualified filename of the patchfile.
 */
Creates a link file, which allows the actual patch to live in
a directory different from the update directory.
@param   dir
The patch directory where the update.link file
should be written.
@param   patchFile
The fully qualified filename of the patchfile.
Creates a link file which allows the actual patch to live in a directory different from the update directory . @param dir The patch directory where the update . link file should be written . @param patchFile The fully qualified filename of the patchfile .
function writeLinkFile(dir, patchFile) {
  var linkFile = dir.clone();
  linkFile.append(FILE_UPDATE_LINK);
  writeStringToFile(linkFile, patchFile.path);
  if (patchFile.path.indexOf(gExtStorage) == 0) {
    acquireSDCardMountLock();
  }
}
function writeLinkFile ( dir , patchFile ) { var linkFile = dir . clone ( ) ; linkFile . append ( FILE_UPDATE_LINK ) ; writeStringToFile ( linkFile , patchFile . path ) ; if ( patchFile . path . indexOf ( gExtStorage ) == 0 ) { acquireSDCardMountLock ( ) ; } }
Creates a link file, which allows the actual patch to live in
 a directory different from the update directory.
Creates a link file which allows the actual patch to live in a directory different from the update directory .
// The patchfile is being stored on external storage. Try to lock it // so that it doesn't get shared with the PC while we're downloading // to it.