utils.py 文件源码

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

项目:haproxystats 作者: unixsurfer 项目源码 文件源码
def is_unix_socket(path):
    """
    Check if path is a valid UNIX socket.

    Arguments:
        path (str): A file name path

    Returns:
        True if path is a valid UNIX socket otherwise False.
    """
    mode = os.stat(path).st_mode

    return stat.S_ISSOCK(mode)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号