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

Function _create_temporary

tools/python-3.11.9-amd64/Lib/mailbox.py:2121–2125  ·  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

2119 os.close(fd)
2120
2121def _create_temporary(path):
2122 """Create a temp file based on path and open for reading and writing."""
2123 return _create_carefully('%s.%s.%s.%s' % (path, int(time.time()),
2124 socket.gethostname(),
2125 os.getpid()))
2126
2127def _sync_flush(f):
2128 """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