Add file to the Files collection.
(self, file: File)
| 95 | return self._src_uris.get(PurePath(path).as_posix()) |
| 96 | |
| 97 | def append(self, file: File) -> None: |
| 98 | """Add file to the Files collection.""" |
| 99 | if file.src_uri in self._src_uris: |
| 100 | warnings.warn( |
| 101 | "To replace an existing file, call `remove` before `append`.", DeprecationWarning |
| 102 | ) |
| 103 | del self._src_uris[file.src_uri] |
| 104 | self._src_uris[file.src_uri] = file |
| 105 | |
| 106 | def remove(self, file: File) -> None: |
| 107 | """Remove file from Files collection.""" |
no outgoing calls