system-util-0.2: Various system utils lifted to EitherT

Safe HaskellNone

System.Util

Synopsis

Documentation

getShellExe :: FilePath -> EitherT IOException IO FilePathSource

Check if a executable pointed by the given environement variable exists, and is executable.

getXdgConfigFolder :: EitherT IOException IO FilePathSource

Get configuration folder http:stackoverflow.coma1024339/516184

checkOrCreate :: FilePath -> EitherT IOException IO FilePathSource

Check if a given directory exists, and if it features Read/Write permissions. If it does not exist, create it.

tidleExp :: FilePath -> EitherT IOException IO FilePathSource

Perform tidle expansion so that ~ = $HOME. It does not handle tidle as $HOME in other places besides first caracter in FilePath

getDefaultShell :: EitherT IOException IO FilePathSource

Determine system shell: best effort. Tries $SHELL variable first, then POSIX shell user entry, than in a last effort binsh.