autogen.py 文件源码

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

项目:xgovctf 作者: alphagov 项目源码 文件源码
def guess_mimetype(resource_path):
    """
    Guesses the mimetype of a given resource.

    Args:
        resource_path: the path to a given resource.
    Returns:
        The mimetype string.
    """

    mime = mimetypes.guess_type(resource_path)[0]

    if mime is None:
        return "application/octet-stream"

    return mime
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号