MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / readFileSync

Function readFileSync

python/pythonmonkey/require.py:241–249  ·  view source on GitHub ↗

Utility function for reading files. Returns: str: The contents of the file

(filename, charset)

Source from the content-addressed store, hash-verified

239
240
241def readFileSync(filename, charset) -> str:
242 """
243 Utility function for reading files.
244 Returns:
245 str: The contents of the file
246 """
247 filename = os.path.normpath(filename)
248 with open(filename, "r", encoding=charset) as fileHnd:
249 return fileHnd.read()
250
251
252def existsSync(filename: str) -> bool:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected