Removes files from compacting status: this is different from 'markObsolete'
because it should be run regardless of whether a compaction succeeded.
512535
public void unmarkCompacting(Iterable<SSTableReader> unmark)
    {
        boolean isValid = cfstore.isValid();
        if (!isValid)
        {
            // The CF has been dropped.  We don't know if the original compaction suceeded or failed,
            // which makes it difficult to know if the sstable reference has already been released.
            // A "good enough" approach is to mark the sstables involved obsolete, which if compaction succeeded
            // is harmlessly redundant, and if it failed ensures that at least the sstable will get deleted on restart.
            for (SSTableReader sstable : unmark)
                sstable.markObsolete();
        }

        View currentView, newView;
        do
        {
            currentView = view.get();
            newView = currentView.unmarkCompacting(unmark);
        }
        while (!view.compareAndSet(currentView, newView));

        if (!isValid)
        {
            // when the CFS is invalidated, it will call unreferenceSSTables().  However, unreferenceSSTables only deals
            // with sstables that aren't currently being compacted.  If there are ongoing compactions that finish or are
            // interrupted after the CFS is invalidated, those sstables need to be unreferenced as well, so we do that here.
            unreferenceSSTables();
        }
    }
987544
def delete(self):
        
        fs, path = self._get_fs(create_dir=False)
        if fs.exists(path):
            fs.remove(path)
        if self.clean_dir and fs.exists('.'):
            fs.removedir('.')
        return True
1265615
def delete(filething):
    

    t = OggFLAC(filething)
    filething.fileobj.seek(0)
    t.delete(filething)
601846
def Close(self):
    
    if not self._is_open:
      raise IOError('Not opened.')

    if not self._is_cached:
      close_file_system = True
    elif self._resolver_context.ReleaseFileSystem(self):
      self._is_cached = False
      close_file_system = True
    else:
      close_file_system = False

    if close_file_system:
      self._Close()
      self._is_open = False
      self._path_spec = None
1197406
private static void cleanup(ContextFromVertx context) {
        // Release all resources, especially uploaded file.
        if (context != null) {
            context.cleanup();
        }
        Context.CONTEXT.remove();
    }
843968
def clean(verbose=False):
    
    def rm(name):
        if os.path.isfile(name):
            os.remove(name)
            if verbose:
                printer.info('Removed file:', name)
        else:
            if verbose:
                printer.info('File not present:', name)

    def rmdir(name):
        if os.path.isdir(name):
            shutil.rmtree(name)
            if verbose:
                printer.info('Removed directory:', name)
        else:
            if verbose:
                printer.info('Directory not present:', name)

    root = os.getcwd()

    rmdir('build')
    rmdir('dist')

    for path, dirs, files in os.walk(root):
        rel_path = os.path.relpath(path, root)

        if rel_path == '.':
            rel_path = ''

        if rel_path.startswith('.'):
            continue

        for d in dirs:
            if d == '__pycache__':
                rmdir(os.path.join(rel_path, d))

        for f in files:
            if f.endswith('.pyc') or f.endswith('.pyo'):
                rm(os.path.join(rel_path, f))
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;
        }
    }
233888
private static synchronized void cleanup() {
		int cleanedDirs = 0;
		int cleanedFiles = 0;
		// retrieve leftover swap directories
		File[] swapDirs = TMP_DIR.listFiles(new FileFilter() {
			public boolean accept(File pathname) {
				return pathname.getName().endsWith(SWAP_DIR_SUFFIX);
			}
		});
		for(File swapDir : swapDirs) {
			// check if swap directory is locked
			File lockFile = new File(TMP_DIR, swapDir.getName() + LOCK_FILE_SUFFIX);
			if(lockFile.exists() == false) {
				// no lock file, recursively delete leftover swap dir
				cleanedDirs++;
				cleanedFiles += deleteRecursively(swapDir);
			}
		}
		System.out.println("NikeFS2: cleaned up " + cleanedFiles + 
				" stale swap files (from " + cleanedDirs + " sessions).");
	}
155417
def delete
      unless in_zip?
        FileUtils.rm_rf selected_items.map(&:path)
      else
        Zip::File.open(current_zip) do |zip|
          zip.select {|e| selected_items.map(&:name).include? e.to_s}.each do |entry|
            if entry.name_is_directory?
              zip.dir.delete entry.to_s
            else
              zip.file.delete entry.to_s
            end
          end
        end
      end
      @current_row -= selected_items.count {|i| i.index <= current_row}
      ls
    end
242915
public void cleanup() {
        if (file != null && file.exists() && !file.delete()) {
            LOGGER.debug("Failed to delete first temporary file {}", file.toString());
            file.deleteOnExit();
        }
    }
1186217
def _delete_uncompressed(
        collection_name, spec, safe, last_error_args, opts, flags=0):
    """"""
    op_delete, max_bson_size = _delete(collection_name, spec, opts, flags)
    rid, msg = __pack_message(2006, op_delete)
    if safe:
        rid, gle, _ = __last_error(collection_name, last_error_args)
        return rid, msg + gle, max_bson_size
    return rid, msg, max_bson_size
805656
def cleanup(self):
        
        if getattr(self._finalizer, "detach", None) and self._finalizer.detach():
            if os.path.exists(self.path):
                try:
                    rmtree(self.path)
                except OSError:
                    pass
                else:
                    self.path = None
688774
def flush(self):
        
        annotation = self.get_annotation()
        if annotation.get(ATTACHMENTS_STORAGE) is not None:
            del annotation[ATTACHMENTS_STORAGE]
1030121
def removeFileSafely(filename,clobber=True):
    
    if filename is not None and filename.strip() != '':
        if os.path.exists(filename) and clobber: os.remove(filename)
554904
def delete(filething):
    

    t = OggOpus(filething)
    filething.fileobj.seek(0)
    t.delete(filething)
65610
def cleanup(self):
        
        if self.sock is not None:
            self.sock.close()
        if self.outfile is not None:
            self.outfile.close()
        if self.bar is not None:
            self.update_progress(complete=True)
106020
def remove(in_bam):
    
    if utils.file_exists(in_bam):
        utils.remove_safe(in_bam)
    if utils.file_exists(in_bam + ".bai"):
        utils.remove_safe(in_bam + ".bai")