__delitem__#
- barecat._api.Barecat.__delitem__(path)[source]#
Remove a file from the Barecat archive.
- Parameters:
path (str) – Path to the file within the archive.
- Raises:
KeyError – If a file with this path does not exist in the archive.
Examples
>>> bc = Barecat('test.barecat', readonly=False) >>> bc['file.txt'] = b'Hello, world!' >>> bc['file.txt'] b'Hello, world!' >>> del bc['file.txt'] >>> bc['file.txt'] Traceback (most recent call last): ... KeyError: 'file.txt'