-
Notifications
You must be signed in to change notification settings - Fork 82
Decide how to represent pathnames #124
Copy link
Copy link
Closed
Labels
apiAPI design decisionAPI design decision
Description
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.
- Find out what other languages do (e.g. look at Python's pathlib, Rust, etc).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
apiAPI design decisionAPI design decision