@Override
    public void renameDirectory(String directory, String newname)
    {
        if (!dirEntries.containsKey(directory.toLowerCase())) return;
        DirEntry de = dirEntries.get(directory.toLowerCase());
        DirEntry parent = de.parentDir;
        
        String parentpath = "";
        if (parent != null)
        {
            if (fileEntries.containsKey((parent.fullName + "/" + newname).toLowerCase()) ||
                dirEntries.containsKey((parent.fullName + "/" + newname).toLowerCase())) 
            return;
            
            parentpath = parent.fullName;
        }
        
        dirEntries.remove(de.fullName.toLowerCase());
        
        de.name = newname;
        de.fullName = parentpath + "/" + newname;
        
        dirEntries.put(de.fullName.toLowerCase(), de);
    }