_globscan.py 文件源码

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

项目:SDK 作者: Keypirinha 项目源码 文件源码
def globscan(
        input_paths, recursive=False, allow_wildcards=True,
        include_dirs=True, include_hidden=False,
        raise_not_found=True):
    """
    :py:func:`glob.glob` then scan *input_paths* and return a list of
    :py:class:`FsEntry` objects.

    *input_paths* can be a single string or an iterable that contains paths
    (wildcard are accepted unless *allow_wildcards* is false).

    A ``FileNotFoundError`` exception will be raised if one of the specified
    input paths is missing, unless the *raise_not_found* flag is false.

    :py:class:`FsEntry` is compatible with Python's :py:class:`os.DirEntry`
    class.

    **CAUTION:** this function **is not** thread-safe as it installs a trap at
    runtime (i.e. for :py:func:`glob._ishidden`). The ``glob`` module must not
    be used concurrently to this function.
    """
    return list(iglobscan(input_paths, recursive, allow_wildcards,
                          include_dirs, include_hidden, raise_not_found))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号