主页
Python
Python stat 模块
demo_ref_module_stat_basic
运行 ❯
×
更改方向
保存代码
更改主题
import os import stat mode = os.stat('.').st_mode if stat.S_ISDIR(mode): print('Current path is a directory') else: print('Current path is not a directory')
Current path is a directory