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

Function _create_carefully

Lib/mailbox.py:2189–2191  ·  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

2187 os.remove(f.name + '.lock')
2188
2189def _create_carefully(path):
2190 """Create a file if it doesn't exist and open for reading and writing."""
2191 return open(path, 'xb+')
2192
2193def _create_temporary(path):
2194 """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

Used in the wild real call sites across dependent graphs

searching dependent graphs…