public void deleteFile(final String name) throws FileNotFoundException {
    // TODO locks?

    // TODO - What is the state of the system if
    // things crash in the middle of removing this file?
    // Seems like a file will be left with some
    // dangling chunks at the end of the file
    File file = (File) fileAndChunkRegion.remove(name);
    if (file == null) {
      throw new FileNotFoundException(name);
    }

    if (file.possiblyRenamed == false) {
      // TODO consider removeAll with all ChunkKeys listed.
      final ChunkKey key = new ChunkKey(file.id, 0);
      while (true) {
        // TODO consider mutable ChunkKey
        if (null == fileAndChunkRegion.remove(key)) {
          // no more chunks
          break;
        }
        key.chunkId++;
      }
    }
    stats.incFileDeletes(1);
  }
Create filesystem that will store data in the two provided regions. The fileAndChunkRegion
contains metadata about the files, and the chunkRegion contains the actual data. If data from
either region is missing or inconsistent, no guarantees are made about what this class will do,
so it's best if these regions are colocated and in the same disk store to ensure the data
remains together.

@param fileAndChunkRegion the region to store metadata about the files
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystem.java