Move the contents of file at *src* to path-or-filelike *dst*. If *dst* is a path, the metadata of *src* are *not* copied.
(src, dst)
| 73 | |
| 74 | |
| 75 | def _move_path_to_path_or_stream(src, dst): |
| 76 | """ |
| 77 | Move the contents of file at *src* to path-or-filelike *dst*. |
| 78 | |
| 79 | If *dst* is a path, the metadata of *src* are *not* copied. |
| 80 | """ |
| 81 | if is_writable_file_like(dst): |
| 82 | fh = (open(src, encoding='latin-1') |
| 83 | if file_requires_unicode(dst) |
| 84 | else open(src, 'rb')) |
| 85 | with fh: |
| 86 | shutil.copyfileobj(fh, dst) |
| 87 | else: |
| 88 | shutil.move(src, dst, copy_function=shutil.copyfile) |
| 89 | |
| 90 | |
| 91 | def _font_to_ps_type3(font_path, subset_index, glyph_indices): |
no test coverage detected
searching dependent graphs…