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_genericpath.py:19–21 ·
view source on GitHub ↗
(filename, data=b'foo')
Source
from the content-addressed store, hash-verified
17
18
19
def
create_file(filename, data=b
'foo'
):
20
with
open(filename,
'xb'
, 0)
as
fp:
21
fp.write(data)
22
23
24
class
GenericTest:
Callers
11
test_getsize
Method · 0.70
test_filetime
Method · 0.70
test_exists
Method · 0.70
test_isdir
Method · 0.70
test_isfile
Method · 0.70
test_samefile
Method · 0.70
_test_samefile_on_link_func
Method · 0.70
test_samestat
Method · 0.70
_test_samestat_on_link_func
Method · 0.70
test_sameopenfile
Method · 0.70
setUp
Method · 0.70
Calls
2
open
Function · 0.50
write
Method · 0.45
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…