type determines the type of a file or directory. Prints "file", "directory" or "No such path".
