@Override
    public void deleteDirectory(String directory)
    {
        if (!dirEntries.containsKey(directory.toLowerCase())) return;
        DirEntry de = dirEntries.get(directory.toLowerCase());
        DirEntry parent = de.parentDir;
        
        if (parent != null)
            parent.childrenDirs.remove(de);
        
        dirEntries.remove(directory.toLowerCase());
        
        for (DirEntry cde : de.childrenDirs)
            dirEntries.remove(cde.fullName.toLowerCase());
        for (FileEntry cfe : de.childrenFiles)
            fileEntries.remove(cfe.fullName.toLowerCase());
    }