sdk/python/Utilities/PyGenericpath
Utilities

PyGenericpath

Python stdlib module — genericpath. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.commonprefix()Neutral
#
Signature
commonprefix(m)

Given a list of pathnames, returns the longest common leading component

.exists()Neutral
#
Signature
exists(path)

Test whether a path exists. Returns False for broken symbolic links

.getatime()Neutral
#
Signature
getatime(filename)

Return the last access time of a file, reported by os.stat().

.getctime()Neutral
#
Signature
getctime(filename)

Return the metadata change time of a file, reported by os.stat().

.getmtime()Neutral
#
Signature
getmtime(filename)

Return the last modification time of a file, reported by os.stat().

.getsize()Neutral
#
Signature
getsize(filename)

Return the size of a file, reported by os.stat().

.isdir()Neutral
#
Signature
isdir(s)

Return true if the pathname refers to an existing directory.

.isfile()Neutral
#
Signature
isfile(path)

Test whether a path is a regular file

.samefile()Neutral
#
Signature
samefile(f1, f2)

Test whether two pathnames reference the same actual file or directory

.sameopenfile()Neutral
#
Signature
sameopenfile(fp1, fp2)

Test whether two open file objects reference the same file

Fully-Qualified Names

FQNField
genericpathfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
import genericpath