Removes all temporary files from disk.
IMPORTANT! Use this call only in the end
when you are sure you don't need report files anymore
2993
public void cleanup() {
        if (this.childStorages != null) {
            for (FileTempStorage storage : this.childStorages) {
                storage.cleanup();
            }
        }

        for (File file : this.files.values()) {
            FileUtils.deleteQuietly(file);
        }
        this.files.clear();
    }
926554
public function removeAll()
    {
        $command = sprintf(
            'rm -rf %s%s*',
            rtrim($this->targetDirectory, DIRECTORY_SEPARATOR),
            DIRECTORY_SEPARATOR
        );

        exec($command);
    }
1287454
def close(self):
        

        if self.tmpdir:
            rmtree(self.tmpdir)
            self.tmpdir = None

        self._contents = None
968410
@Transactional(readOnly = true)
  public void cleanupData()
  {

    List<String> allFilesInDatabaseList = getJdbcTemplate().queryForList(
      "SELECT filename FROM media_files AS m", String.class);

    File dataDir = getRealDataDir();

    Set<File> allFilesInDatabase = new HashSet<>();
    for (String singleFileName : allFilesInDatabaseList)
    {
      allFilesInDatabase.add(new File(dataDir, singleFileName));
    }

    log.info("Cleaning up the data directory");
    // go through each file of the folder and check if it is not included
    File[] childFiles = dataDir.listFiles();
    if (childFiles != null)
    {
      for (File f : childFiles)
      {
        if (f.isFile() && !allFilesInDatabase.contains(f))
        {
          if (!f.delete())
          {
            log.warn("Could not delete {}", f.getAbsolutePath());
          }
        }
      }
    }
  }
394104
def cleanup(self):
        """"""
        t = time.time()
        for noncefile in glob(self.path + '/*.nonce'):
            if os.path.getmtime(noncefile) + self.expiration > t:
                os.unlink(noncefile)
446193
def clean!
      stop
      remove_instance_dir!
      FileUtils.remove_entry(config.download_path) if File.exists?(config.download_path)
      FileUtils.remove_entry(config.tmp_save_dir, true) if File.exists? config.tmp_save_dir
      md5.clean!
      FileUtils.remove_entry(config.version_file) if File.exists? config.version_file
    end
112230
public void deleteTemporaryFiles() {
    if (!shouldReap()) {
      return;
    }

    for (File file : temporaryFiles) {
      try {
        FileHandler.delete(file);
      } catch (WebDriverException e) {
        // ignore; an interrupt will already have been logged.
      }
    }
  }
1301707
function cleanupTempFiles (options) {
  return new Promise((resolve, reject) => {
    if (options.tempDir) {
      if (path.dirname(options.sourceMap) === options.tempDir) {
        fs.unlinkSync(options.sourceMap)
      }
      fs.rmdir(options.tempDir, (err) => {
        if (err) {
          reject(err)
        } else {
          resolve()
        };
      })
    } else {
      resolve()
    }
  })
}
1124994
public static void clearTempFiles() {
		String userFolderPath = getUserFolderPath(false);
		File file = new File(userFolderPath);
		deleteDir(file);
	}
625017
def clean_tmpdir
      self.root_dir.each do |d|
        if d != '..' and d!='.'
          if d.to_i < Time.now.to_i-TIME_LIMIT
            FileUtils.rm_rf(File.join(self.root_dir.path, d))
          end
        end
      end
    end
663288
def cleanup_environment():
    
    SERV.terminate()
    shutil.rmtree(TMP_PATH)
    if os.path.exists(TMP_PATH):
        os.rmdir(TMP_PATH)

    global TMP_PATH
    TMP_PATH = None
47114
private void cleanUp(File f) {
        if (f != null && f.getParentFile() != null) {
            if (m_absoluteTempPath.equalsIgnoreCase(f
                    .getParentFile().getAbsolutePath())) {
                f.delete();
            }
        }
    }
1310493
public function remove_files() {
        $fs = get_file_storage();
        $files = $fs->get_external_files($this->id);
        foreach ($files as $storedfile) {
            $storedfile->delete();
        }
    }
822047
def clean_directories!
      all_build_files = File.join(@app.config[:build_dir], '**', '*')

      empty_directories = Dir[all_build_files].select do |d|
        File.directory?(d)
      end

      empty_directories.each do |d|
        remove_file d, force: true if Pathname(d).children.empty?
      end
    end
240299
def close(self):
        
        try:
            self.p.stdin.write(bytes("X\n","utf-8"))
            self.p.stdin.flush()
        except IOError:
            self.report("could not send exit command")
        self.p.wait() # wait until the process is closed
        try:
            os.remove(self.tmpfile) # clean up the temporary file
        except FileNotFoundError:
            pass
822727
public function clearDisk() {

		$filePath		= $this->getFilePath();
		$mediumPath		= $this->getMediumPath();
		$thumbPath		= $this->getThumbPath();

		// Delete from disk
		if( $filePath && file_exists( $filePath ) && is_file( $filePath ) ) {

			unlink( $filePath );
		}

		if( $mediumPath && file_exists( $mediumPath ) && is_file( $mediumPath ) ) {

			unlink( $mediumPath );
		}

		if( $thumbPath && file_exists( $thumbPath ) && is_file( $thumbPath ) ) {

			unlink( $thumbPath );
		}
	}
417692
public function clearAllPersistentData ()
    {
        $filename = $this->config->get('file_directory').DIRECTORY_SEPARATOR.$this->config->get('file_name');
        unlink ($filename);
    }