For file delete.
177475
function deleteFile(req, res) {
		var rest = req.params["0"];
		var file = fileUtil.getFile(req, rest);
		fileUtil.withStatsAndETag(file.path, function(error, stats, etag) {
			var callback = function(error) {
				if (error) {
					return writeError(500, res, error);
				}
				sendStatus(204, res);
			};
			var ifMatchHeader = req.headers['if-match'];
			if (error && error.code === 'ENOENT') {
				return sendStatus(204, res);
			} else if (error) {
				writeError(500, res, error);
			} else if (ifMatchHeader && ifMatchHeader !== etag) {
				return sendStatus(412, res);
			} else if (stats.isDirectory()) {
				fileUtil.rumRuff(file.path, callback);
			} else {
				fs.unlink(file.path, callback);
			}
		});
	}
1025095
private function actionDelete()
    {
        $baseName = substr($this->path, 0, strrpos($this->path, '.'));
        $files = glob($baseName . '.*');
        if (!is_array($files))
        {
            $files = array();
        }
        $files2 = glob($baseName . '-*');
        if (!is_array($files2))
        {
            $files2 = array();
        }

        $files = array_merge($files, $files2);

        foreach ($files as $file)
        {
            @unlink($file);
        }
    }
1276806
function deleteFiles(files) {
	_.castArray(files).forEach(file => {
		if (!fs.existsSync(file)) {
			return;
		}

		log.removed(`Delete ${file}`);
		fs.removeSync(file);
	});
}
497246
def safe_delete(filename):
  """"""
  try:
    os.unlink(filename)
  except OSError as e:
    if e.errno != errno.ENOENT:
      raise
298782
public void delete() {
    try {
      close();
      Files.delete(file.toPath());
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
174075
def delete_files_within_dir(directory: str, filenames: List[str]) -> None:
    
    for dirpath, dirnames, fnames in os.walk(directory):
        for f in fnames:
            if f in filenames:
                fullpath = os.path.join(dirpath, f)
                log.debug("Deleting {!r}", fullpath)
                os.remove(fullpath)
1033619
def delete(self, filething=None):
        """"""

        fileobj = filething.fileobj
        data = _APEv2Data(fileobj)
        if data.start is not None and data.size is not None:
            delete_bytes(fileobj, data.end - data.start, data.start)
        self.clear()
167847
private boolean deleteFile(String filename) throws Exception {
        if (filename == null) {
            return false;
        }
        File file = new File(storeDir, filename);
        return Files.deleteIfExists(file.toPath());
    }
163565
static void cleanup() {
        LOGGER.entering();

        for (String temp : files) {
            new File(temp).delete();
        }

        // Cleaning up the files list
        files.clear();
        LOGGER.exiting();
    }
857510
public static final void deleteQuietly(File file)
   {
      if (file != null)
      {
         if (file.isDirectory())
         {
            File[] children = file.listFiles();
            if (children != null)
            {
               for (File child : children)
               {
                  deleteQuietly(child);
               }
            }
         }
         file.delete();
      }
   }
753516
public static void delete(String filename) {
		File file = new File(filename);
		if(file.exists()){
			file.delete();
		}
	}
1076953
private void deleteFiles(Predicate<File> predicate) {
    directory.mkdirs();

    // Iterate through all files in the storage directory.
    for (File file : directory.listFiles(f -> f.isFile() && predicate.test(f))) {
      try {
        Files.delete(file.toPath());
      } catch (IOException e) {
        // Ignore the exception.
      }
    }
  }
242915
public void cleanup() {
        if (file != null && file.exists() && !file.delete()) {
            LOGGER.debug("Failed to delete first temporary file {}", file.toString());
            file.deleteOnExit();
        }
    }
147124
def delete(filething):
    

    t = OggTheora(filething)
    filething.fileobj.seek(0)
    t.delete(filething)
1166923
def remover(file_path):
    """"""
    if os.path.isfile(file_path):
        os.remove(file_path)
        return True
    elif os.path.isdir(file_path):
        shutil.rmtree(file_path)
        return True
    else:
        return False
1170753
def clear(self):
        """"""
        with self.lock:
            for filehandle, refcount in list(self.files.items()):
                if refcount == 0:
                    filehandle.close()
                    del self.files[filehandle]
                    del self.past[self.past.index(filehandle)]
255327
def filedict(self, kv):
        """"""

        k, v = kv
        if v is not None:
            self.__files.update({k: v})
        else:
            with suppress(KeyError):
                del self.__files[k]