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

Function create_file

Lib/test/test_os/utils.py:1–3  ·  view source on GitHub ↗
(filename, content=b'content')

Source from the content-addressed store, hash-verified

1def create_file(filename, content=b'content'):
2 with open(filename, "xb", 0) as fp:
3 fp.write(content)

Callers 15

test_12084Method · 0.70
test_large_readMethod · 0.70
test_large_readintoMethod · 0.70
test_replaceMethod · 0.70
test_copy_file_rangeMethod · 0.70
test_spliceMethod · 0.70
test_splice_offset_inMethod · 0.70
setUpMethod · 0.70
test_access_deniedMethod · 0.70
setUpMethod · 0.70

Calls 2

openFunction · 0.50
writeMethod · 0.45

Tested by 15

test_12084Method · 0.56
test_large_readMethod · 0.56
test_large_readintoMethod · 0.56
test_replaceMethod · 0.56
test_copy_file_rangeMethod · 0.56
test_spliceMethod · 0.56
test_splice_offset_inMethod · 0.56
setUpMethod · 0.56
test_access_deniedMethod · 0.56
setUpMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…