MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / _regular

Function _regular

scripts/test-impact/coverage_live_v2.py:71–82  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

69
70
71def _regular(path):
72 parent, name = os.path.split(os.path.abspath(path))
73 directory = _directory(parent)
74 try:
75 fd = os.open(name, os.O_RDONLY | os.O_NOFOLLOW | os.O_NONBLOCK,
76 dir_fd=directory)
77 finally:
78 os.close(directory)
79 if not stat.S_ISREG(os.fstat(fd).st_mode):
80 os.close(fd)
81 _error("input", "input is not a regular file")
82 return fd
83
84
85def _signature(info):

Callers 2

_readFunction · 0.85
_identityFunction · 0.85

Calls 4

_directoryFunction · 0.85
_errorFunction · 0.85
openMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected