Using file object to figure hierarchy of files.