edit file content
(path, newcontent, binary=False)
| 99 | |
| 100 | |
| 101 | def edit_content(path, newcontent, binary=False): |
| 102 | """edit file content""" |
| 103 | mode = 'w' |
| 104 | if binary: |
| 105 | mode = 'wb' |
| 106 | # pylint: disable=W1514 |
| 107 | with open(path, mode) as file: |
| 108 | file.write(newcontent) |
| 109 | |
| 110 | |
| 111 | def create_dir(path): |
no outgoing calls