Skip to content

Document paths as byte strings vs char strings #305

@grr

Description

@grr

Some methods return byte strings, like children because of the underlying call to readdir. But there is no mention in the docs of what is expected or what is returned, in respect to encoding of pathnames. I tested mkdir and touch with with both a byte string and char string (utf8-encoded and decoded) and both resulted in the same path being created, but I'm not sure if this is guaranteed or only OS-specific. I know you need to encode the pathname as bytes if you pass it to an external command. And pathname comparison requires the two paths to both be either bytes or strings.

Some of this is discussed in #48

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