Skip to content

Remove absolute path support in Dir.open functions #7540

@marler8997

Description

@marler8997

Dir functions like openFile and openDir accept relative paths, but they also accept absolute paths. The implementation could be made simpler if they only worked with relative paths, and the interface would arguably be simpler/easier to understand. I'm not sure what benefit we get by making them also work with absolute paths. By removing absolute path support in these functions, the only thing we would lose is open functions that can work with relative and absolute paths, but these methods could be implemented as "free functions" without a Dir reference (if we wanted to support this mechanism). I propose removing support for absolute paths in the Dir functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions