MCPcopy Index your code
hub / github.com/cool-RR/PySnooper / is_file

Method is_file

tests/mini_toolbox/pathlib.py:1572–1584  ·  view source on GitHub ↗

Whether this path is a regular file (also True for symlinks pointing to regular files).

(self)

Source from the content-addressed store, hash-verified

1570 return False
1571
1572 def is_file(self):
1573 """
1574 Whether this path is a regular file (also True for symlinks pointing
1575 to regular files).
1576 """
1577 try:
1578 return S_ISREG(self.stat().st_mode)
1579 except OSError as e:
1580 if e.errno not in (ENOENT, ENOTDIR):
1581 raise
1582 # Path doesn't exist or is a broken symlink
1583 # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
1584 return False
1585
1586 def is_symlink(self):
1587 """

Callers

nothing calls this directly

Calls 1

statMethod · 0.95

Tested by

no test coverage detected