Represent metadata for a filesystem entry.
The metadata for a filesystem entry (file, directory, device, ...)
consists of its stat(2) result, plus ACL and xattr.
This class represents them as fields.
We do not store all stat(2) fields. Here's a commentary on all fields:
field? stored? why
st_atime_sec yes mutt compares atime, mtime to see ifmsg is new
st_atime_nsec yes mutt compares atime, mtime to see ifmsg is new
st_blksize no no way to restore, not useful backed up
st_blocks yes should restore create holes in file?
st_ctime no no way to restore, not useful backed up
st_dev yes used to restore hardlinks
st_gid yes used to restore group ownership
st_ino yes used to restore hardlinks
st_mode yes used to restore permissions
st_mtime_sec yes used to restore mtime
st_mtime_nsec yes used to restore mtime
st_nlink yes used to restore hardlinks
st_rdev no no use (correct me if I'm wrong about this)
st_size yes user needs it to see size of file in backup
st_uid yes used to restored ownership
The field 'target' stores the target of a symlink.
Additionally, the fields 'groupname' and 'username' are stored. They
contain the textual names that correspond to st_gid and st_uid. When
restoring, the names will be preferred by default.
The 'md5' field optionally stores the whole-file checksum for the file.
The 'xattr' field optionally stores extended attributes encoded as
a binary blob.
Definition at line 37 of file metadata.py.