update_file#
- barecat.Index.update_file(path, new_shard=None, new_offset=None, new_size=None, new_crc32c=None, new_mtime_ns=None, new_mode=None, new_uid=None, new_gid=None)[source]#
Update file metadata in the index.
- Parameters:
path (str) – Path of the file.
new_shard (Optional[int]) – New shard number. If None, the shard is not updated.
new_offset (Optional[int]) – New offset within the shard. If None, the offset is not updated.
new_size (Optional[int]) – New size of the file. If None, the size is not updated.
new_crc32c (Optional[int]) – New CRC32C checksum of the file. If None, the checksum is not updated.
new_mtime_ns (Optional[int]) – New modification time in nanoseconds. If None, not updated.
new_mode (Optional[int]) – New file mode. If None, not updated.
new_uid (Optional[int]) – New user ID. If None, not updated.
new_gid (Optional[int]) – New group ID. If None, not updated.