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

Method is_file

tools/python-3.11.9-amd64/Lib/pathlib.py:1261–1276  ·  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

1259 return False
1260
1261 def is_file(self):
1262 """
1263 Whether this path is a regular file (also True for symlinks pointing
1264 to regular files).
1265 """
1266 try:
1267 return S_ISREG(self.stat().st_mode)
1268 except OSError as e:
1269 if not _ignore_error(e):
1270 raise
1271 # Path doesn't exist or is a broken symlink
1272 # (see http://web.archive.org/web/20200623061726/https://bitbucket.org/pitrou/pathlib/issues/12/ )
1273 return False
1274 except ValueError:
1275 # Non-encodable path
1276 return False
1277
1278 def is_mount(self):
1279 """

Callers 1

create_archiveFunction · 0.95

Calls 3

statMethod · 0.95
S_ISREGFunction · 0.90
_ignore_errorFunction · 0.85

Tested by

no test coverage detected