Skip to content

Commit b2feb75

Browse files
committed
add a docstring to ArchiveEntry.stored_digests
1 parent 1e40b89 commit b2feb75

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libarchive/entry.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,14 @@ def rdevminor(self, value):
437437

438438
@property
439439
def stored_digests(self):
440+
"""The file's hashes stored in the archive.
441+
442+
libarchive only supports reading and writing digests from and to 'mtree'
443+
files. Setting the digests requires at least version 3.8.0 of libarchive
444+
(released in May 2025). It also requires including the names of the
445+
digest algorithms in the string of options passed to the archive writer
446+
(e.g. `file_writer(archive_path, 'mtree', options='md5,rmd160,sha256')`).
447+
"""
440448
return {name: self.get_stored_digest(name) for name in ffi.DIGEST_ALGORITHMS}
441449

442450
@stored_digests.setter

0 commit comments

Comments
 (0)