stat --- 直譯 stat() 的結果¶
原始碼:Lib/stat.py
The stat module defines constants and functions for interpreting the
results of os.stat(), os.fstat() and os.lstat() (if they
exist). For complete details about the stat(), fstat() and
lstat() calls, consult the documentation for your system.
在 3.4 版的變更: The stat module is backed by a C implementation.
stat 模組定義了以下函式,用於測試特定檔案類型:
- stat.S_ISDIR(mode)¶
Return non-zero if the mode is from a directory.
- stat.S_ISCHR(mode)¶
Return non-zero if the mode is from a character special device file.
- stat.S_ISBLK(mode)¶
Return non-zero if the mode is from a block special device file.
- stat.S_ISREG(mode