Skip to content
UPEEC

filecmp and stat

Compare files and directories, and interpret file-mode bits.

Intermediate
Comments 0

filecmp.cmp(a, b, shallow=False) compares contents; stat.S_ISDIR(mode) tests file types from os.stat().

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.