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

Method process_pipe

src/borg/archive.py:1383–1413  ·  view source on GitHub ↗
(self, *, path, cache, fd, mode, user=None, group=None)

Source from the content-addressed store, hash-verified

1381 return status
1382
1383 def process_pipe(self, *, path, cache, fd, mode, user=None, group=None):
1384 status = "i" # stdin (or other pipe)
1385 self.print_file_status(status, path)
1386 status = None # we already printed the status
1387 if user is not None:
1388 uid = user2uid(user)
1389 if uid is None:
1390 raise Error("no such user: %s" % user)
1391 else:
1392 uid = None
1393 if group is not None:
1394 gid = group2gid(group)
1395 if gid is None:
1396 raise Error("no such group: %s" % group)
1397 else:
1398 gid = None
1399 t = int(time.time()) * 1000000000
1400 item = Item(path=path, mode=mode & 0o107777 | 0o100000, mtime=t, atime=t, ctime=t) # forcing regular file mode
1401 if user is not None:
1402 item.user = user
1403 if group is not None:
1404 item.group = group
1405 if uid is not None:
1406 item.uid = uid
1407 if gid is not None:
1408 item.gid = gid
1409 self.process_file_chunks(item, cache, self.stats, self.show_progress, backup_io_iter(self.chunker.chunkify(fd)))
1410 item.get_size(memorize=True)
1411 self.stats.nfiles += 1
1412 self.add_item(item, stats=self.stats)
1413 return status
1414
1415 def process_file(self, *, path, parent_fd, name, st, cache, flags=flags_normal, last_try=False, strip_prefix):
1416 with self.create_helper(path, st, None, strip_prefix=strip_prefix) as (

Callers 1

create_innerMethod · 0.80

Calls 8

user2uidFunction · 0.85
ErrorClass · 0.85
group2gidFunction · 0.85
backup_io_iterFunction · 0.85
print_file_statusMethod · 0.80
process_file_chunksMethod · 0.80
add_itemMethod · 0.80
chunkifyMethod · 0.45

Tested by

no test coverage detected