Skip to content

glob should show only directories when used with */ #712

Open
@phcerdan

Description

@phcerdan

The POSIX glob and python glob.glob make this distinction.
glob("/path/*") shows all the files and directories
glob("/path/*/") shows only directories

There was a bug in pathlib with the same issue: python/cpython#10349 . Fixed in Python 3.11

Related: #407

Also, s3fs.glob("/path/*") should show keys for folders ending with "/", and keys for files without ending "/", for consistency with aws docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions