MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / read_text

Method read_text

tools/python-3.11.9-amd64/Lib/pathlib.py:1053–1059  ·  view source on GitHub ↗

Open the file in text mode, read it, and close the file.

(self, encoding=None, errors=None)

Source from the content-addressed store, hash-verified

1051 return f.read()
1052
1053 def read_text(self, encoding=None, errors=None):
1054 """
1055 Open the file in text mode, read it, and close the file.
1056 """
1057 encoding = io.text_encoding(encoding)
1058 with self.open(mode='r', encoding=encoding, errors=errors) as f:
1059 return f.read()
1060
1061 def write_bytes(self, data):
1062 """

Callers 2

generate_or_checkFunction · 0.45

Calls 2

openMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected