schecks.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:BotBot 作者: jackstanek 项目源码 文件源码
def dir_group_readable(path):
    """Check if a directory is accessible and readable"""
    mode = path.stat().mode
    if not stat.S_ISDIR(mode):
        return
    else:
        if not bool(stat.S_IXGRP & mode):
            return 'PROB_DIR_NOT_ACCESSIBLE'
        elif not bool(stat.S_IWGRP & mode):
            return 'PROB_DIR_NOT_WRITABLE'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号