Julian Ospald 78a3baeb25 | 8 years ago | |
---|---|---|
benchmarks | 8 years ago | |
cbits | 8 years ago | |
src | 8 years ago | |
test | 8 years ago | |
.ghci | 9 years ago | |
.gitignore | 8 years ago | |
.travis.yml | 8 years ago | |
CHANGELOG | 8 years ago | |
LICENSE | 8 years ago | |
README.md | 8 years ago | |
Setup.hs | 9 years ago | |
doctests-hpath.hs | 8 years ago | |
doctests-posix.hs | 8 years ago | |
hpath.cabal | 8 years ago |
Support for well-typed paths in Haskell. Also provides ByteString based filepath manipulation.
The motivation came during development of hsfm which has a pretty strict File type, but lacks a strict Path type, e.g. for user input.
The library that came closest to my needs was path, but the API turned out to be oddly complicated for my use case, so I decided to fork it.
Similarly, posix-paths was exactly what I wanted for the low-level operations, but upstream seems dead, so it is forked as well and merged into this library.
Path Fn
for safe filename guarantees and a RelC
class~/
as relative path, because on posix level ~
is just a regular filename that does NOT point to $HOME
hasTrailingPathSeparator
behaves in the same way as System.FilePath
dropTrailingPathSeparator
behaves in the same way as System.FilePath
isValid
, normalise
and equalFilePath
word8
package for save word8 literals instead of OverloadedStrings
openFd
and getDirectoryContents