WRITE: delete file.
162595
def delete(bs)
      # Deallocate data chain.
      bs.wipeChain(self.firstCluster) if self.firstCluster != 0
      # Deallocate dir entry.
      if @lfn_ents then @lfn_ents.each {|ent| ent['seq_num'] = AF_DELETED} end
      @dir_ent['name'][0] = AF_DELETED
      @dirty = true
      self.writeEntry(bs)
    end
769476
private synchronized static void delete(File file) {
        // Check if file is directory
        if (file.isDirectory()) {
            // Get all files in the folder
            File[] files = file.listFiles();

            // Delete each file in the folder
            for (int i = 0; i < files.length; ++i) {
                delete(files[i]);
            }

            // Delete the folder
            file.delete();
        } else {
            // Delete the file if it is not a folder
            file.delete();
        }
    }
1265615
def delete(filething):
    

    t = OggFLAC(filething)
    filething.fileobj.seek(0)
    t.delete(filething)
753516
public static void delete(String filename) {
		File file = new File(filename);
		if(file.exists()){
			file.delete();
		}
	}
74223
def delete(self):
        
        if os.path.isfile(self.path):
            os.remove(self.path)
        else:
            shutil.rmtree(self.path)
554904
def delete(filething):
    

    t = OggOpus(filething)
    filething.fileobj.seek(0)
    t.delete(filething)
1128067
def _delete_file(fileName, n=10):
    """"""
    status = False
    count = 0
    while not status and count < n:
        try:
            _os.remove(fileName)
        except OSError:
            count += 1
            _time.sleep(0.2)
        else:
            status = True
    return status
713621
def delete_file(client, bucket, remote_path):
    """"""
    bucket = client.get_bucket(bucket)
    bucket.delete_blob(remote_path)
652559
def erase(self, partition, timeout_ms=None):
    """"""
    self._simple_command('erase', arg=partition, timeout_ms=timeout_ms)
420026
def close(self):
        
        self.out_stream.close()
        # If we're asked to write in place, substitute the named
        # temporary file for the current file
        if self.in_place:
            shutil.move(self.temp_file.name, self.out)
898605
private function deleteFile() {
		if(file_exists($this->folder."messages_".$this->language.".php")) {
			unlink($this->folder."messages_".$this->language.".php");
		}
	}
1136970
def remove_path(path):
    """"""
    if path is None or not os.path.exists(path):
        return
    if platform.system() == 'Windows':
        # Need to have write permission before deleting the file.
        os.chmod(path, stat.S_IWRITE)
    try:
        if os.path.isdir(path):
            shutil.rmtree(path)
        elif os.path.isfile(path):
            shutil.os.remove(path)
    except OSError:
        logger.exception("Could not remove path: %s" % path)
982531
public void deleteFile(String fileId) throws IOException {
    Preconditions.checkNotNull(fileId, "fileId is required");
    Path p = new Path(fileId);
    if (LOG.isDebugEnabled()) {
      LOG.debug("Deleting path: " + p + " , fileId: " + fileId);
    }
    fileSystem.delete(p, true);
  }
438656
def remove_file(path, remove=os.remove, exists=os.path.exists):
    """"""
    try:
        remove(path)
    except OSError:
        if exists(path):
            raise
68094
@Override
  public void delete() {
    LOGGER.debug("Deleting {}", this);
    Path path = file.file().toPath();
    if (Files.exists(path)) {
      try {
        Files.delete(file.file().toPath());
      } catch (IOException e) {
      }
    }
  }
1037910
def remove_file(filename, verbose=True):
    
    if verbose:
        LOG.info('Deleting file %s', os.path.relpath(filename, config.BASE_DIR))
    if not os.path.exists(filename):
        LOG.warning("File does not exist: %s", os.path.relpath(filename, config.BASE_DIR))
    else:
        os.remove(filename)
725857
def delete_file(self, path):
        
        self.log.debug("S3contents.GenericManager: delete_file '%s'", path)
        if self.file_exists(path) or self.dir_exists(path):
            self.fs.rm(path)
        else:
            self.no_such_entity(path)