Julian Ospald 08fa277b31 | 7 years ago | |
---|---|---|
benchmarks | 8 years ago | |
cbits | 8 years ago | |
src | 7 years ago | |
test | 8 years ago | |
.ghci | 9 years ago | |
.gitignore | 8 years ago | |
.travis.yml | 8 years ago | |
CHANGELOG | 7 years ago | |
LICENSE | 8 years ago | |
README.md | 7 years ago | |
Setup.hs | 9 years ago | |
doctests-hpath.hs | 8 years ago | |
doctests-posix.hs | 8 years ago | |
hpath.cabal | 7 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
word8
package for save word8 literals instead of OverloadedStrings
hasTrailingPathSeparator
and dropTrailingPathSeparator
behave in the same way as their System.FilePath
counterpartequalFilePath
getSearchPath
hasParentDir
hiddenFile
isFileName
isValid
makeRelative
makeValid
normalise
splitSearchPath
stripExtension
openFd
which allows more control over the flags than its unix package counterpartgetDirectoryContents'
version that works on Fd