code: public void sweepFile(long now, Path p) throws Exception {
          if (p == null) {
              return;
          }
          long expiry = getExpiryFromFilename(p.getFileName().toString());
          // files with 0 expiry never expire
          if (expiry > 0 && ((now - expiry) >= (5 * TimeUnit.SECONDS.toMillis(gracePeriodSec)))) {
              Files.deleteIfExists(p);
              if (log.isDebugEnabled()) {
                  log.debug("Sweep deleted " + p.getFileName());
              }
          }
      }
docs: Check to see if the expiry on the file is very old, and
  delete the file if so. "Old" means that it expired at least
  5 gracePeriods ago.
  
  @param now the time now in msec
  @param p the file to check
  @throws Exception indicating error in sweep