MCPcopy Index your code
hub / github.com/python/cpython / create_file

Method create_file

Lib/test/test_pathlib/support/zip_path.py:37–38  ·  view source on GitHub ↗
(self, path, data=b'')

Source from the content-addressed store, hash-verified

35 root.zip_file.close()
36
37 def create_file(self, path, data=b''):
38 path.zip_file.writestr(vfspath(path), data)
39
40 def create_dir(self, path):
41 zip_info = zipfile.ZipInfo(vfspath(path) + '/')

Callers 5

create_hierarchyMethod · 0.95
test_copy_file_emptyMethod · 0.45
test_read_textMethod · 0.45

Calls 2

vfspathFunction · 0.90
writestrMethod · 0.80

Tested by 4

test_copy_file_emptyMethod · 0.36
test_read_textMethod · 0.36