util.py 文件源码

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

项目:zanph 作者: zanph 项目源码 文件源码
def set_mode(self, bits, mask, files):
        if os.name == 'posix' or (os.name == 'java' and os._name == 'posix'):
            # Set the executable bits (owner, group, and world) on
            # all the files specified.
            for f in files:
                if self.dry_run:
                    logger.info("changing mode of %s", f)
                else:
                    mode = (os.stat(f).st_mode | bits) & mask
                    logger.info("changing mode of %s to %o", f, mode)
                    os.chmod(f, mode)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号