Skip to content

Decide how to represent pathnames #124

@talex5

Description

@talex5

At the moment, paths in Eio are strings, which are used in the context of some base directory. e.g.

Eio.Dir.with_open_in cwd "foo/input.dat" (fun flow -> ...)

This should work well on most systems, but we need to think about how to support Windows too.

Possibilities include:

  • Using Unix path strings everywhere and providing a way to import and export Windows paths.
  • Using an abstract type for paths.

The Fpath library encodes lots of knowledge about Windows paths. It probably can't be used directly because its paths behave differently depending on the host platform (preventing e.g. a program running on Linux from creating paths that are to be used on Windows). The path rules should probably be per-filesystem instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAPI design decision

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions