Lines Matching full:file_name
44 "{}/{}".format(dir_path, file_name)[2:]
46 for file_name in file_names
47 if file_name.endswith(extension)
51 def read_txt_file(file_name): argument
52 … """Read the content of a text file with name `file_name` and return content as a list of lines"""
53 with open(file_name, 'r') as file:
58 def write_txt_file(file_name, lines): argument
59 """Write a text file with name `file_name` with the content given as a list of `lines`"""
60 with open(file_name, 'w') as file:
64 def update_build_file(file_name, start_string, end_string, new_list, search_string=None): argument
66 …Update the file given by `file_name` by replacing the list after the first occurrence of `start_st…
75 lines = read_txt_file(file_name)
97 raise RuntimeError('failed to update build file: {}'.format(file_name))
100 write_txt_file(file_name, new_lines)
125 formatted_list = [" {}\n".format(file_name[9:]) for file_name in core_cpp_files]
135 formatted_list = [" \"{}\",\n".format(file_name[9:]) for file_name in core_hpp_cpp_files]
138 formatted_list = [" \"{}\",\n".format(file_name[9:]) for file_name in core_h_files]
145 formatted_list = [" \"{}\",\n".format(file_name[19:]) for file_name in include_h_files]