SideBarAPI.py 文件源码

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

项目:new-file-pro 作者: KevinHoo 项目源码 文件源码
def write(self, content):
        with open(self.path(), 'w+', encoding='utf8', newline='') as f:
            f.write(str(content))

        if 3000 <= int(sublime.version()) < 3088:
            # Fixes as best as possible a new file permissions issue
            # See https://github.com/titoBouzout/SideBarEnhancements/issues/203
            # See https://github.com/SublimeTextIssues/Core/issues/239
            oldmask = os.umask(0o000)
            if oldmask == 0:
                os.chmod(self.path(), 0o644)
            os.umask(oldmask)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号