Skip to content

glob() should take a Path not str #78

Open
@remram44

Description

@remram44

Paths on UNIX are bytes, not unicode. Using str means that all of them can't be represented.

In particular, on systems set with a different locale, or when using disks that were created in a different locale, or simply because of some glitch somewhere, files using non-UTF-8 byte sequence can totally exist.

Not only is it not that much of a corner-case, but the standard library already dealt with that by providing the Path type. AsRef<Path> can also be used to allow users to still pass in string slices and string literals.

Related to #23 which is not about the interface but a bug in the internals.

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