MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / add

Method add

pipcl.py:751–759  ·  view source on GitHub ↗
(from_, to_)

Source from the content-addressed store, hash-verified

749 with zipfile.ZipFile(path, 'w', self.wheel_compression, self.wheel_compresslevel) as z:
750
751 def add(from_, to_):
752 if isinstance(from_, str):
753 z.write(from_, to_)
754 record.add_file(from_, to_)
755 elif isinstance(from_, bytes):
756 z.writestr(to_, from_)
757 record.add_content(from_, to_)
758 else:
759 assert 0
760
761 def add_str(content, to_):
762 add(content.encode('utf8'), to_)

Callers 11

get_mupdf_internalFunction · 0.45
test_2979Function · 0.45
test_htmlbox2Function · 0.45
test_4254Function · 0.45
test_4716Function · 0.45
mainFunction · 0.45
test_4139Function · 0.45
bbox_countFunction · 0.45
test_open2Function · 0.45
recorderFunction · 0.45
prism.jsFile · 0.45

Calls 6

log2Function · 0.85
log1Function · 0.85
add_contentMethod · 0.80
addFunction · 0.70
writeMethod · 0.45
add_fileMethod · 0.45

Tested by 7

test_2979Function · 0.36
test_htmlbox2Function · 0.36
test_4254Function · 0.36
test_4716Function · 0.36
test_4139Function · 0.36
bbox_countFunction · 0.36
test_open2Function · 0.36