MCPcopy Index your code
hub / github.com/RustPython/RustPython / open

Method open

Lib/pathlib/__init__.py:763–771  ·  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

761 st.st_dev == other_st.st_dev)
762
763 def open(self, mode='r', buffering=-1, encoding=None,
764 errors=None, newline=None):
765 """
766 Open the file pointed to by this path and return a file object, as
767 the built-in open() function does.
768 """
769 if "b" not in mode:
770 encoding = io.text_encoding(encoding)
771 return io.open(self, mode, buffering, encoding, errors, newline)
772
773 def read_bytes(self):
774 """

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
resolveEntityMethod · 0.45
openFunction · 0.45
whichdbFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected