Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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_hierarchy
Method · 0.95
test_copy_file_empty
Method · 0.45
test_copy_file_to_existing_file
Method · 0.45
test_read_text
Method · 0.45
test_read_text_with_newlines
Method · 0.45
Calls
2
vfspath
Function · 0.90
writestr
Method · 0.80
Tested by
4
test_copy_file_empty
Method · 0.36
test_copy_file_to_existing_file
Method · 0.36
test_read_text
Method · 0.36
test_read_text_with_newlines
Method · 0.36