MCPcopy Index your code
hub / github.com/python/cpython / open

Method open

Lib/pathlib/__init__.py:961–969  ·  view source on GitHub ↗

Open the file pointed to by this path and return a file object, as the built-in open() function does.

(self, mode='r', buffering=-1, encoding=None,
             errors=None, newline=None)

Source from the content-addressed store, hash-verified

959 st.st_dev == other_st.st_dev)
960
961 def open(self, mode='r', buffering=-1, encoding=None,
962 errors=None, newline=None):
963 """
964 Open the file pointed to by this path and return a file object, as
965 the built-in open() function does.
966 """
967 if "b" not in mode:
968 encoding = io.text_encoding(encoding)
969 return io.open(self, mode, buffering, encoding, errors, newline)
970
971 def read_bytes(self):
972 """

Callers 15

read_bytesMethod · 0.95
read_textMethod · 0.95
write_bytesMethod · 0.95
write_textMethod · 0.95
runMethod · 0.45
simple_server.pyFile · 0.45
saveMethod · 0.45
saveMethod · 0.45
touchMethod · 0.45
_open_in_browserFunction · 0.45
resolveEntityMethod · 0.45
openFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected