acbs_src_process.py 文件源码

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

项目:acbs 作者: AOSC-Dev 项目源码 文件源码
def file_type_full(file_loc):
    try:
        import magic
    except:
        print('[W] ACBS cannot find libmagic bindings, will use bundled one instead.')
        import lib.magic as magic
    mco = magic.open(magic.NONE | magic.MAGIC_SYMLINK)
    mco.load()
    try:
        tp = mco.file(file_loc)
    except:
        print('[W] Unable to determine the file type!')
        return 'data'
    return tp.decode('utf-8')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号