parses the directory files