(filename, content, byte_content=False)
| 85 | |
| 86 | |
| 87 | def write_file(filename, content, byte_content=False): |
| 88 | path = normalize_path(filename) |
| 89 | |
| 90 | prepare_folder(os.path.dirname(path)) |
| 91 | |
| 92 | mode = "w" |
| 93 | if byte_content: |
| 94 | mode += "b" |
| 95 | |
| 96 | with open(path, mode) as file: |
| 97 | file.write(content) |
| 98 | |
| 99 | |
| 100 | def prepare_folder(folder_path): |
nothing calls this directly
no test coverage detected