Class NestedFolders


  • public class NestedFolders
    extends Object
    Keep files in a nested filed structure to minimize amount of directory entries (inodes) in a single directory.
    Author:
    svenmeier
    • Constructor Detail

      • NestedFolders

        public NestedFolders​(File base)
        Create folders in the given base folder.
        Parameters:
        base - base has to be a folder
    • Method Detail

      • get

        public File get​(String name,
                        boolean create)
        Get a nested folder for the given name.
        Parameters:
        name - name
        create -
        Returns:
      • remove

        public void remove​(String name)
        Remove a nested folder.
        Parameters:
        name - name of folder
      • getAll

        public Set<FilegetAll()
        Get all files inside.
        Returns:
        files