ex_commands.py 文件源码

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

项目:VintageousPlus 作者: trishume 项目源码 文件源码
def check_is_readonly(self, fname):
        '''
        Returns `True` if @fname is read-only on the filesystem.

        @fname
          Path to a file.
        '''
        if not fname:
            return

        try:
            mode = os.stat(fname)
            read_only = (stat.S_IMODE(mode.st_mode) & stat.S_IWUSR != stat.S_IWUSR)
        except FileNotFoundError:
            return

        return read_only
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号