let filename_of_string str = try let lexbuf = Lexing.from_string str in OsOperation.dir_reader lexbuf with Parsing.Parse_error -> raise FilePathInvalidFilename