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

Function _create_temporary

Lib/mailbox.py:2193–2197  ·  view source on GitHub ↗

Create a temp file based on path and open for reading and writing.

(path)

Source from the content-addressed store, hash-verified

2191 return open(path, 'xb+')
2192
2193def _create_temporary(path):
2194 """Create a temp file based on path and open for reading and writing."""
2195 return _create_carefully('%s.%s.%s.%s' % (path, int(time.time()),
2196 socket.gethostname(),
2197 os.getpid()))
2198
2199def _sync_flush(f):
2200 """Ensure changes to file f are physically on disk."""

Callers 2

flushMethod · 0.85
_lock_fileFunction · 0.85

Calls 2

_create_carefullyFunction · 0.85
timeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…