this code returns directory name of a file you requested