| Copyright | (c) Oleksandr Zhabenko 2019-2024 |
|---|---|
| License | MIT |
| Maintainer | oleksandr.zhabenko@yahoo.com |
| Safe Haskell | None |
| Language | Haskell2010 |
EndOfExe2
Description
A small library to deal with executable endings. Uses a Maybe data representation inside an IO monad.
It is a fork of now deprecated library mmsyn3.
Documentation
maybeEndOfExecutable :: String -> IO (Maybe String) Source #
Can be used instead of os to check whether the executable ends in ".exe". The function returns IO Nothing if there is neither
ys nor (ys ++ ".exe") names for executables in the search path. It can also search in other locations and its behaviour is OS dependent. For more information, please, refer to the link: https://hackage.haskell.org/package/directory-1.3.4.0/docs/System-Directory.html#v:findExecutable
For more information, how the executable is searched, see also the following address: https://hackage.haskell.org/package/process-1.6.18.0/docs/System-Process.html#t:CmdSpec
endOfExe :: String -> IO String Source #
The function endOfExe returns IO "" if no executable found by findExecutable. Otherwise, it returns its path in the IO monad.
showE :: String -> Maybe String Source #
Gets the proper name of the executable in the system (it must be seen in the directories in the PATH variable).
Further you can adopt it to be used
inside the callCommand as the name of the executable