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

Function _create_carefully

Lib/mailbox.py:2184–2186  ·  view source on GitHub ↗

Create a file if it doesn't exist and open for reading and writing.

(path)

Source from the content-addressed store, hash-verified

2182 os.remove(f.name + '.lock')
2183
2184def _create_carefully(path):
2185 """Create a file if it doesn't exist and open for reading and writing."""
2186 return open(path, 'xb+')
2187
2188def _create_temporary(path):
2189 """Create a temp file based on path and open for reading and writing."""

Callers 3

_create_tmpMethod · 0.85
addMethod · 0.85
_create_temporaryFunction · 0.85

Calls 1

openFunction · 0.70

Tested by

no test coverage detected