Removes the given mockfile. skip_trash doesn't have any meaning.
425616
def remove(self, path, recursive=True, skip_trash=True):
        
        if recursive:
            to_delete = []
            for s in self.get_all_data().keys():
                if s.startswith(path):
                    to_delete.append(s)
            for s in to_delete:
                self.get_all_data().pop(s)
        else:
            self.get_all_data().pop(path)
758234
def delete(self):
        
        self.clear()
        if os.path.isfile(self._filename):
            os.unlink(self._filename)
        else:
            LOGGER.debug('Session file did not exist: %s', self._filename)
676949
def untrack(context, file_names):
    
    context.obj.find_repo_type()
    for fn in file_names:
        if context.obj.vc_name == 'git':
            context.obj.call(['git', 'rm', '--cached', fn])
        elif context.obj.vc_name == 'hg':
            context.obj.call(['hg', 'forget', fn])
905617
def unqueue_and_display(self, filename):
        """"""
        if self.running and self.ws:
            self.editor.lazy_display_error(filename)
            self.unqueue()
1684
def delete(self):
        """"""
        if self.isfile:
            os.remove(self.fn)
        elif self.isdir:
            shutil.rmtree(self.fn)
218129
def removeSpecfile(self, specfiles):
        
        for specfile in aux.toList(specfiles):
            for datatypeContainer in ['rmc', 'cic', 'smic', 'saic', 'sic']:
                dataContainer = getattr(self, datatypeContainer)
                try:
                    del dataContainer[specfile]
                except KeyError:
                    pass
            del self.info[specfile]
367329
def delete_mockdata_url(service_name, implementation_name,
                        url, headers,
                        dir_base=dirname(__file__)):
    
    # Http response code 204 No Content:
    # The server has fulfilled the request but does not need to
    # return an entity-body
    response = MockHTTP()
    response.status = 204
    return response
1105895
def _clean_file(self, filename):
        """"""
        if not os.path.exists(filename):
            return
        self.announce("removing '{}'".format(filename))
        if not self.dry_run:
            os.remove(filename)
719141
public static function cleanMocks(string $mockNamespace = self::MOCK_ENABLED): void
    {
        if (isset(static::$instances[$mockNamespace])) {
            unset(static::$instances[$mockNamespace]);
        }
    }
714025
protected function _cleanFilesStack()
    {
        if (true===$this->isCleaned_files_stack) {
            return;
        }

        $new_stack = array();
        foreach ($this->files_stack as $_file) {
            if (is_object($_file) && ($_file instanceof \SplFileInfo)) {
                $new_stack[] = $_file;
            } elseif (is_string($_file) && @file_exists($_file)) {
                $new_stack[] = new \SplFileInfo($_file);
            } elseif (false===$this->silent) {
                throw new \RuntimeException(
                    sprintf('[Compressor] Source to process "%s" not found!', $_file)
                );
            }
        }
        $this->files_stack = $new_stack;
        $this->isCleaned_files_stack = true;
    }
1090803
def cleanup(self):
        """"""
        shutil.rmtree(self.name, onerror=lambda *a: os.chmod(a[1], __import__('stat').S_IWRITE) or os.unlink(a[1]))
        if os.path.exists(self.name):
            raise IOError(17, "File exists: '{}'".format(self.name))
296301
def cleanup(self):
        """"""
        for file in glob.glob(self.basename + '*'):
            os.unlink(file)
702865
public function tearDownMockery()
    {
        if (class_exists(Mockery::class, false)) {
            $container = Mockery::getContainer();

            if ($container) {
                $this->addToAssertionCount($container->mockery_getExpectationCount());
            }

            Mockery::close();
        }
    }
874561
def delete(self):
        # type: (_BaseResumeManager) -> None
        
        self.close()
        if self._resume_file.exists():  # noqa
            try:
                self._resume_file.unlink()
            except OSError as e:
                logger.warning('could not unlink resume db: {}'.format(e))
        for ext in ('.bak', '.dat', '.dir'):  # noqa
            fp = pathlib.Path(str(self._resume_file) + ext)
            if fp.exists():
                try:
                    fp.unlink()
                except OSError as e:
                    logger.warning('could not unlink resume db: {}'.format(e))
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
1051575
private void wipe(String dbfile) {
    File file = new File(dbfile);
    File dir = file.getParentFile();
    if (dir == null)
      return; // means directory doesn't exist. make error message elsewhere
    for (File f : dir.listFiles())
      if (f.getName().startsWith(file.getName()))
        f.delete();
  }
1139023
def exclude_options(ignore_file_path)
      ar = File.read(ignore_file_path)
      ar = ar.split("\n")
      ar.map! do |r|
        r.gsub!(/#.*$/,""); r.gsub!(/^\s*?$/,"")
        r.gsub!(/^\//,"./"); r.gsub!(/\/$/,"/*")
        r
      end
      ar =  ar.delete_if{|r|r==""}
      ar.map! do |r|
        "--exclude '" + r + "'"
      end
      return ar.join(" ")
    end