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

Function _unlock_file

tools/python-3.11.9-amd64/Lib/mailbox.py:2106–2111  ·  view source on GitHub ↗

Unlock file f using lockf and dot locking.

(f)

Source from the content-addressed store, hash-verified

2104 raise
2105
2106def _unlock_file(f):
2107 """Unlock file f using lockf and dot locking."""
2108 if fcntl:
2109 fcntl.lockf(f, fcntl.LOCK_UN)
2110 if os.path.exists(f.name + '.lock'):
2111 os.remove(f.name + '.lock')
2112
2113def _create_carefully(path):
2114 """Create a file if it doesn't exist and open for reading and writing."""

Callers 6

unlockMethod · 0.85
addMethod · 0.85
__setitem__Method · 0.85
get_messageMethod · 0.85
get_bytesMethod · 0.85
unlockMethod · 0.85

Calls 2

existsMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected