tools.py 文件源码

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

项目:hachoir3 作者: vstinner 项目源码 文件源码
def _ftypelet(mode):
    if stat.S_ISREG(mode) or not stat.S_IFMT(mode):
        return '-'
    if stat.S_ISBLK(mode):
        return 'b'
    if stat.S_ISCHR(mode):
        return 'c'
    if stat.S_ISDIR(mode):
        return 'd'
    if stat.S_ISFIFO(mode):
        return 'p'
    if stat.S_ISLNK(mode):
        return 'l'
    if stat.S_ISSOCK(mode):
        return 's'
    return '?'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号