infer directory from file