Format directory.