Open file or directory and get ready to parse