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

Method __init__

tools/python-3.11.9-amd64/Lib/tarfile.py:314–321  ·  view source on GitHub ↗
(self, name, mode)

Source from the content-addressed store, hash-verified

312 """
313
314 def __init__(self, name, mode):
315 mode = {
316 "r": os.O_RDONLY,
317 "w": os.O_WRONLY | os.O_CREAT | os.O_TRUNC,
318 }[mode]
319 if hasattr(os, "O_BINARY"):
320 mode |= os.O_BINARY
321 self.fd = os.open(name, mode, 0o666)
322
323 def close(self):
324 os.close(self.fd)

Callers

nothing calls this directly

Calls 1

openMethod · 0.45

Tested by

no test coverage detected