Remove temporary HTML and PDF files
163906
public function removeTmpFiles()
	{
		if (file_exists($this->getHTMLPath()))
		{
			@unlink($this->getHTMLPath());
		}
		if (file_exists($this->getPDFPath()))
		{
			@unlink($this->getPDFPath());
		}
	}
819671
static function clear()
    {
        if (empty(self::$_cache) || self::$_dompdf->getOptions()->getDebugKeepTemp()) {
            return;
        }

        foreach (self::$_cache as $file) {
            if (self::$_dompdf->getOptions()->getDebugPng()) {
                print "[clear unlink $file]";
            }
            unlink($file);
        }

        self::$_cache = array();
    }
1219086
def remove_temporary_source(self):
        """"""
        if self.is_bundle or os.path.exists(self.delete_marker_filename):
            logger.info('Removing source in %s' % self.source_dir)
            if self.source_dir:
                rmtree(self.source_dir)
            self.source_dir = None
        if self._temp_build_dir and os.path.exists(self._temp_build_dir):
            rmtree(self._temp_build_dir)
        self._temp_build_dir = None
1133287
public function deleteTempFiles()
    {
        foreach ($this->_tempFiles as $tmp) {
            if (is_dir($tmp)) {
                FileHelper::removeDirectory($tmp);
            } else {
                @unlink($tmp);
            }
        }

        return true;
    }
839591
def clean(ctx, dry_run=False):
    """"""
    basedir = ctx.sphinx.destdir or "build/docs"
    cleanup_dirs([basedir], dry_run=dry_run)
876337
def cleanup_tmpdir(dirname):
    """"""
    if dirname is not None and os.path.exists(dirname):
        shutil.rmtree(dirname)
1204315
def remove_file(file_path):
    """"""
    if path.exists(file_path):
        try:
            rmtree(file_path)
        except Exception:
            print('Unable to remove temporary workdir {}'.format(file_path))
1270904
def clean_html(self, html):
        """"""
        result_type = type(html)
        if isinstance(html, six.string_types):
            doc = html_fromstring(html)
        else:
            doc = copy.deepcopy(html)
        self(doc)
        if issubclass(result_type, six.binary_type):
            return tostring(doc, encoding='utf-8')
        elif issubclass(result_type, six.text_type):
            return tostring(doc, encoding='unicode')
        else:
            return doc
1017545
function remove( $conditions = null, $extraConditions = null )
    {
        if ( $this->attribute( 'version' ) == eZPDFExport::VERSION_VALID &&
             $this->attribute( 'status' ) != eZPDFExport::CREATE_ONFLY )
        {
            $sys = eZSys::instance();
            $storage_dir = $sys->storageDirectory();

            $filename = $storage_dir . '/pdf/' . $this->attribute( 'pdf_filename' );
            if ( file_exists( $filename ) )
            {
                unlink( $filename );
            }
        }
        parent::remove( $conditions, $extraConditions);
    }
1149838
def temporary(cls):
        
        fh, path = tempfile.mkstemp(suffix='.hdf5')
        os.close(fh)
        self = cls(path, 'w')
        self.path = path
        return self
1252304
def Clean():
  """"""
  # Find all the compiled proto files and unlink them.
  for (root, _, files) in os.walk(ROOT):
    for filename in files:
      full_filename = os.path.join(root, filename)
      if full_filename.endswith("_pb2.py") or full_filename.endswith(
          "_pb2.pyc"):
        os.unlink(full_filename)
1050991
function removePartial(fs, path, callback) {
  removeAttr(fs, path, constants.attributes.partial, callback);
}
1290111
def clean(ctx, docs=False, bytecode=False, extra=''):
    ''''''
    patterns = ['build', 'dist', 'cover', 'docs/_build', '**/*.pyc', '*.egg-info', '.tox']
    for pattern in patterns:
        print('Removing {0}'.format(pattern))
        with ctx.cd(ROOT):
            ctx.run('rm -rf {0}'.format(pattern))
616136
function cleanDocs(docs) {
  for (var i = 0; i < docs.length; i++) {
    var doc = docs[i];
    if (doc._deleted) {
      delete doc._attachments; // ignore atts for deleted docs
    } else if (doc._attachments) {
      // filter out extraneous keys from _attachments
      var atts = Object.keys(doc._attachments);
      for (var j = 0; j < atts.length; j++) {
        var att = atts[j];
        doc._attachments[att] = pouchdbUtils.pick(doc._attachments[att],
          ['data', 'digest', 'content_type', 'length', 'revpos', 'stub']);
      }
    }
  }
}
68734
private function cleanUp()
    {
        if ($this->quiet) {
            $errors = explode(PHP_EOL, ob_get_clean());
            $shown = [];

            foreach ($errors as $error) {
                if ($error && !in_array($error, $shown)) {
                    out($error, 'error');
                    $shown[] = $error;
                }
            }
        }

        if (file_exists($this->tmpPharPath)) {
            @unlink($this->tmpPharPath);
        }
        if (file_exists($this->tmpPubkeyPath)) {
            @unlink($this->tmpPharPath);
        }
    }
1277735
public synchronized void cleanup(boolean deleteTemporary) {
        if (deleteTemporary && tempDirectory != null && tempDirectory.exists()) {
            LOGGER.debug("Deleting ALL temporary files from `{}`", tempDirectory.toString());
            FileUtils.delete(tempDirectory);
            tempDirectory = null;
        }
    }
845369
function remove_inline_scripts(){
      for (var i = 0; i < scripts.length; i++) {
        if (scripts[i].length && scripts[i] !== "\n") {
          html = html.replace(scripts[i], "");
        }
      }
    }