The filepath
package provides functionality for manipulating FilePath
values, and is shipped with both GHC and the Haskell Platform. It provides three modules:
System.FilePath.Posix
manipulates POSIX/Linux styleFilePath
values (with/
as the path separator).System.FilePath.Windows
manipulates Windows styleFilePath
values (with either\
or/
as the path separator, and deals with drives).System.FilePath
is an alias for the module appropriate to your platform.
All three modules provide the same API, and the same documentation (calling out differences in the different variants).