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

Function isfile

tools/python-3.11.9-amd64/Lib/genericpath.py:27–33  ·  view source on GitHub ↗

Test whether a path is a regular file

(path)

Source from the content-addressed store, hash-verified

25# This follows symbolic links, so both islink() and isdir() can be true
26# for the same path on systems that support symlinks
27def isfile(path):
28 """Test whether a path is a regular file"""
29 try:
30 st = os.stat(path)
31 except (OSError, ValueError):
32 return False
33 return stat.S_ISREG(st.st_mode)
34
35
36# Is a path a directory?

Callers 8

readconfigFunction · 0.90
__init__Method · 0.90
show_idlehelpFunction · 0.90
move_fileFunction · 0.90
_msvc14_find_vcvarsallFunction · 0.90
VCRuntimeRedistMethod · 0.90
return_envMethod · 0.90
move_fileFunction · 0.90

Calls 1

statMethod · 0.45

Tested by

no test coverage detected