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

Method process_dir

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

Source from the content-addressed store, hash-verified

1317 return status
1318
1319 def process_dir(self, *, path, parent_fd, name, st, strip_prefix):
1320 with self.create_helper(path, st, "d", hardlinkable=False, strip_prefix=strip_prefix) as (
1321 item,
1322 status,
1323 hardlinked,
1324 hl_chunks,
1325 ):
1326 if item is None:
1327 return status
1328 with OsOpen(path=path, parent_fd=parent_fd, name=name, flags=flags_dir, noatime=True, op="dir_open") as fd:
1329 # fd is None for directories on windows, in that case a race condition check is not possible.
1330 if fd is not None:
1331 with backup_io("fstat"):
1332 st = stat_update_check(st, os.fstat(fd))
1333 item.update(self.metadata_collector.stat_attrs(st, path, fd=fd))
1334 return status
1335
1336 def process_fifo(self, *, path, parent_fd, name, st, strip_prefix):
1337 with self.create_helper(path, st, "f", strip_prefix=strip_prefix) as (

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected