protected void forceDeleteFiles() {
    closeDiskStores();
    File file = tempDir.getRoot();
    File[] files = file.listFiles();
    for (File each : files) {
      try {
        if (!each.getName().contains(".gfs")) {
          FileUtils.forceDelete(each);
        }
      } catch (IOException e) {
        errorCollector.addError(e);
      }
    }
  }
cleans all the directory of all the files present in them
geode-junit/src/main/java/org/apache/geode/internal/cache/DiskRegionTestingBase.java