Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
1
def
create_file(filename, content=b
'content'
):
2
with
open(filename,
"xb"
, 0)
as
fp:
3
fp.write(content)
Callers
15
test_12084
Method · 0.70
test_large_read
Method · 0.70
test_large_readinto
Method · 0.70
test_replace
Method · 0.70
test_copy_file_range
Method · 0.70
test_copy_file_range_offset
Method · 0.70
test_splice
Method · 0.70
test_splice_offset_in
Method · 0.70
test_splice_offset_out
Method · 0.70
setUp
Method · 0.70
test_access_denied
Method · 0.70
setUp
Method · 0.70
Calls
2
open
Function · 0.50
write
Method · 0.45
Tested by
15
test_12084
Method · 0.56
test_large_read
Method · 0.56
test_large_readinto
Method · 0.56
test_replace
Method · 0.56
test_copy_file_range
Method · 0.56
test_copy_file_range_offset
Method · 0.56
test_splice
Method · 0.56
test_splice_offset_in
Method · 0.56
test_splice_offset_out
Method · 0.56
setUp
Method · 0.56
test_access_denied
Method · 0.56
setUp
Method · 0.56
Used in the wild
real call sites across dependent graphs
searching dependent graphs…