Delete entry log files on disk.

@throws IOException
426179
private void deleteEntryFiles(List<Entry<V>> list) throws IOException {
    for(Entry<V> e: list) {
      File file = e.getFile();
      if(file != null && file.exists()) {
        if (file.delete()) {
          _log.info(file.getName() + " deleted");
        } else {
          _log.warn(file.getName() + " not deleted");
        }
      }
    }
  }
1084763
private void processJournal() throws IOException {
		deleteIfExists(journalFileTmp);
		for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {
			Entry entry = i.next();
			if (entry.currentEditor == null) {
				for (int t = 0; t < valueCount; t++) {
					size += entry.lengths[t];
					fileCount++;
				}
			} else {
				entry.currentEditor = null;
				for (int t = 0; t < valueCount; t++) {
					deleteIfExists(entry.getCleanFile(t));
					deleteIfExists(entry.getDirtyFile(t));
				}
				i.remove();
			}
		}
	}
93194
def delete_entries(self, entries):
        
        self.lines = trim([
            line for line in self.lines
            if not isinstance(line, Entry) or line not in entries
        ])
700293
@Override
    public synchronized void cleanup() {
        String pattern = MessageFormat.format(LOGGER_SYSTEM_FORMAT_PATTERN, this.loggerSystemName);
        LogFilenameMatcher matcher = new LogFilenameMatcher(pattern);

        LogFileTraverser.ICollectorCallback cb = new LogFileTraverser.ICollectorCallback() {
            @Override
            public void match(File file,
                              LogFilenameMatcher.LogFilenameParts parts) {
                boolean success = file.delete();
                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug("Deleting " + file + " success=" + success);
                }
            }
        };
        new LogFileTraverser(matcher,
                FileChannelDataLoggerFactory.this.getLoggingDirectory(), cb);
    }
307091
private void cleanLogs() throws Exception {
        File logsDir = new File(serverOutputDir.getAbsolutePath(), "logs");
        if (logsDir.exists()) {
            cleanDir(logsDir);
            log(MessageFormat.format(messages.getString("info.element.cleaned"), "logs"));
        } else {
            log(MessageFormat.format(messages.getString("info.directory.noexist"), logsDir.getAbsolutePath()));
        }
    }
147495
private void delete(DirectoryEntry entry, DeleteMode deleteMode, JimfsPath pathForException)
      throws IOException {
    Directory parent = entry.directory();
    File file = entry.file();

    checkDeletable(file, deleteMode, pathForException);
    parent.unlink(entry.name());
    parent.updateModifiedTime();

    file.deleted();
  }
1373632
def clear_logfile(logfile):
    
    try:
        os.remove(logfile + '_out.txt')
    except IOError:
        pass
    try:
        os.remove(logfile + '_err.txt')
    except IOError:
        pass
723694
@Override
  public void close() throws IOException {
    LOG.info(getTask()+" done; removing files.");
    mapOutputFile.removeAll(getTask().getTaskID());
  }
1330216
public void deleteAll() {
        if(trackedFiles.size() == 0) {
            return;
        }

        ArrayList<File> files = new ArrayList<File>(trackedFiles);
        Collections.sort(files, filePathComparator);

        for(File file : files) {
            if(file.exists()) {
                if(!file.delete()) {
                    throw new DataUtilException("Couldn't delete a tracked "
                            + (file.isFile()? "file":"directory" + ": ") + file.getAbsolutePath());
                }
            }
        }

        trackedFiles.clear();
    }
634172
public synchronized void clear() throws IOException {
    // Commit the header.
    writeHeader(INITIAL_LENGTH, 0, 0, 0);

    // Zero out data.
    raf.seek(HEADER_LENGTH);
    raf.write(ZEROES, 0, INITIAL_LENGTH - HEADER_LENGTH);

    elementCount = 0;
    first = Element.NULL;
    last = Element.NULL;
    if (fileLength > INITIAL_LENGTH) setLength(INITIAL_LENGTH);
    fileLength = INITIAL_LENGTH;
  }
445252
public void close() throws IOException {
    LOG.info(getTask()+" done; removing files.");
    getTask().getProgress().setStatus("closed");
    mapOutputFile.removeAll(getTask().getTaskID());
  }
84311
void removeEntry(NodeId nodeId) throws Exception {
		this.entryCache.remove(nodeId);
		this.entries.remove(nodeId);
	}
521714
protected void closeCurrentEntry() throws IOException {
        if (currentEntry != null) {
            if (currentEntry.getSize() > currentFileSize) {
                throw new IOException( "The current entry[" + currentEntry.getName() + "] of size["
                        + currentEntry.getSize() + "] has not been fully written." );
            }

            currentEntry = null;
            currentFileSize = 0;

            pad();
        }
    }
578950
def delete_log(self, log):
        ''''''
        if os.path.splitext(log)[-1] != '.log':
            raise Exception('File without .log was passed in for deletoin')
        with suppress(Exception):
            os.remove(log)
691754
private void removeOldLogs()
  {
    try {
      Path path = getPath();
      Path parent = path.getParent();

      ArrayList<String> matchList = new ArrayList<String>();

      Pattern archiveRegexp = getArchiveRegexp();
      Files.list(parent).forEach(child->{
        String subPath = child.getFileName().toString();
        
        Matcher matcher = archiveRegexp.matcher(subPath);

        if (matcher.matches())
          matchList.add(subPath);
      });

      Collections.sort(matchList);

      if (_rolloverCount <= 0 || matchList.size() < _rolloverCount)
        return;

      for (int i = 0; i + _rolloverCount < matchList.size(); i++) {
        try {
          Files.delete(parent.resolve(matchList.get(i)));
        } catch (Throwable e) {
        }
      }
    } catch (Throwable e) {
    }
  }
475106
private void deleteSpillFiles() {
    for (UnsafeSorterSpillWriter spill : spillWriters) {
      File file = spill.getFile();
      if (file != null && file.exists()) {
        if (!file.delete()) {
          logger.error("Was unable to delete spill file {}", file.getAbsolutePath());
        }
      }
    }
  }
1366791
public void deleteEntry(final String fsid) throws Exception {
        synchronized (FileStore.getFileStore()) {

            // Remove entry from Feed
            final Feed feed = getFeedDocument();
            updateFeedDocumentRemovingEntry(feed, fsid);

            final String entryFilePath = getEntryPath(fsid);
            FileStore.getFileStore().deleteFile(entryFilePath);

            final String entryMediaPath = getEntryMediaPath(fsid);
            if (entryMediaPath != null) {
                FileStore.getFileStore().deleteFile(entryMediaPath);
            }

            final String entryDirPath = getEntryDirPath(fsid);
            FileStore.getFileStore().deleteDirectory(entryDirPath);

            try {
                Thread.sleep(500L);
            } catch (final Exception ignored) {
            }
        }
    }