B2G/gecko/toolkit/components/places/tests/unit/test_bookmarks_restore_notification.js
/**
 * Creates an nsILocalFile in the profile directory.
 *
 * @param  aBasename
 *         e.g., "foo.txt" in the path /some/long/path/foo.txt
 * @return The nsILocalFile
 */
Creates an nsILocalFile in the profile directory.
Creates an nsILocalFile in the profile directory .
function createFile(aBasename) {
  var file = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
  file.append(aBasename);
  if (file.exists())
    file.remove(false);
  file.create(file.NORMAL_FILE_TYPE, 0666);
  if (!file.exists())
    do_throw("Couldn't create file: " + aBasename);
  return file;
}
function createFile ( aBasename ) { var file = Services . dirsvc . get ( "ProfD" , Ci . nsILocalFile ) ; file . append ( aBasename ) ; if ( file . exists ( ) ) file . remove ( false ) ; file . create ( file . NORMAL_FILE_TYPE , 0666 ) ; if ( ! file . exists ( ) ) do_throw ( "Couldn't create file: " + aBasename ) ; return file ; }
Creates an nsILocalFile in the profile directory.
Creates an nsILocalFile in the profile directory .