Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chasingboy/Xtools
/ write_file
Function
write_file
utils.py:250–255 ·
view source on GitHub ↗
(workdir,text)
Source
from the content-addressed store, hash-verified
248
249
250
def
write_file(workdir,text):
251
file = os.path.join(workdir,hashlib.md5(text.encode(
'utf-8'
)).hexdigest())
252
with
open(file,
'w'
)
as
fw:
253
fw.write(text)
254
255
return
file
256
257
258
def
read_file(file):
Callers
2
run
Method · 0.85
run
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected