MCPcopy Index your code
hub / github.com/borgbackup/borg / process_dev

Method process_dev

src/borg/archive.py:1351–1365  ·  view source on GitHub ↗
(self, *, path, parent_fd, name, st, dev_type, strip_prefix)

Source from the content-addressed store, hash-verified

1349 return status
1350
1351 def process_dev(self, *, path, parent_fd, name, st, dev_type, strip_prefix):
1352 with self.create_helper(path, st, dev_type, strip_prefix=strip_prefix) as (
1353 item,
1354 status,
1355 hardlinked,
1356 hl_chunks,
1357 ): # char/block device
1358 # looks like we can not work fd-based here without causing issues when trying to open/close the device
1359 if item is None:
1360 return status
1361 with backup_io("stat"):
1362 st = stat_update_check(st, os_stat(path=path, parent_fd=parent_fd, name=name, follow_symlinks=False))
1363 item.rdev = st.st_rdev
1364 item.update(self.metadata_collector.stat_attrs(st, path))
1365 return status
1366
1367 def process_symlink(self, *, path, parent_fd, name, st, strip_prefix):
1368 with self.create_helper(path, st, "s", hardlinkable=True, strip_prefix=strip_prefix) as (

Callers

nothing calls this directly

Calls 5

create_helperMethod · 0.95
stat_update_checkFunction · 0.85
os_statFunction · 0.85
stat_attrsMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected