update the structure of the directory.