MCPcopy Create free account
hub / github.com/ChinaGodMan/UserScripts / read_file_to_memory

Function read_file_to_memory

utils/helper.py:35–41  ·  view source on GitHub ↗
(file_path)

Source from the content-addressed store, hash-verified

33
34# 读取文件到内存
35def read_file_to_memory(file_path):
36 with open(file_path, 'r', encoding='utf-8') as f_in:
37 content = f_in.read()
38 virtual_file = io.StringIO(content)
39 lines = [line for line in virtual_file]
40 virtual_file.close()
41 return lines
42
43
44# 比较提交记录

Callers 2

translate_readmeFunction · 0.90
process_fileFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected