MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / _is_file_or_fifo

Function _is_file_or_fifo

src/dotenv/main.py:468–480  ·  view source on GitHub ↗

Return True if `path` exists and is either a regular file or a FIFO.

(path: StrPath)

Source from the content-addressed store, hash-verified

466
467
468def _is_file_or_fifo(path: StrPath) -> bool:
469 """
470 Return True if `path` exists and is either a regular file or a FIFO.
471 """
472 if os.path.isfile(path):
473 return True
474
475 try:
476 st = os.stat(path)
477 except (FileNotFoundError, OSError):
478 return False
479
480 return stat.S_ISFIFO(st.st_mode)

Callers 2

_get_streamMethod · 0.85
find_dotenvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…