util.py 文件源码

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

项目:aiodownload 作者: jelloslinger 项目源码 文件源码
def make_dirs(file_path):
    """Make the directories for a file path

    :param file_path: file path to be created if it doesn't exist
    :type file_path: str

    :return: None
    """

    try:
        os.makedirs(os.path.dirname(file_path))
    except OSError as exc:  # Guard against race condition
        if exc.errno != errno.EEXIST:
            raise  # pragma: no cover
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号