third_party/js/mozmill/shared-modules/downloads.js
function downloadManager_cleanAll(downloads) {
    // Cancel any active downloads
    this.cancelActiveDownloads();

    // If no downloads have been specified retrieve the list from the database
    if (downloads === undefined || downloads.length == 0)
      downloads = this.getAllDownloads();
    else
      downloads = downloads.concat(this.getAllDownloads());

    // Delete all files referred to in the Download Manager
    this.deleteDownloadedFiles(downloads);

    // Clean any entries from the Download Manager database
    this.cleanUp();
  }
function downloadManager_cleanAll(downloads) {
    // Cancel any active downloads
    this.cancelActiveDownloads();

    // If no downloads have been specified retrieve the list from the database
    if (downloads === undefined || downloads.length == 0)
      downloads = this.getAllDownloads();
    else
      downloads = downloads.concat(this.getAllDownloads());

    // Delete all files referred to in the Download Manager
    this.deleteDownloadedFiles(downloads);

    // Clean any entries from the Download Manager database
    this.cleanUp();
  }
function downloadManager_cleanAll ( downloads ) { // Cancel any active downloads this . cancelActiveDownloads ( ) ; // If no downloads have been specified retrieve the list from the database if ( downloads === undefined || downloads . length == 0 ) downloads = this . getAllDownloads ( ) ; else downloads = downloads . concat ( this . getAllDownloads ( ) ) ; // Delete all files referred to in the Download Manager this . deleteDownloadedFiles ( downloads ) ; // Clean any entries from the Download Manager database this . cleanUp ( ) ; }
Cancel any active downloads, remove the files, and clean
up the Download Manager database

@param {Array of download} downloads
Downloaded files which should be deleted (optional)
Cancel any active downloads remove the files and clean up the Download Manager database