create_write_file.py 文件源码

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

项目:maybe 作者: p-e-w 项目源码 文件源码
def filter_mknod(path, type):
    if exists(path):
        return None, None
    elif (type & S_IFCHR):
        label = "create character special file"
    elif (type & S_IFBLK):
        label = "create block special file"
    elif (type & S_IFIFO):
        label = "create named pipe"
    elif (type & S_IFSOCK):
        label = "create socket"
    else:
        # mknod(2): "Zero file type is equivalent to type S_IFREG"
        label = "create file"
    return "%s %s" % (T.cyan(label), T.underline(path)), 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号