end-of-exe-0.1.2.0: A small library to deal with executable endings
Copyright(c) Oleksandr Zhabenko 2019-2024
LicenseMIT
Maintaineroleksandr.zhabenko@yahoo.com
Safe HaskellNone
LanguageHaskell2010

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.

Synopsis

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

showEDup :: String -> Maybe String Source #

Similar to showE but uses unsafeDupablePerformIO, which is more efficient, but for the multiprocessor can lead to executing the IO action multiple times.

showE0 :: String -> String Source #

If executable not found, then returns empty String.

showE0Dup :: String -> String Source #

If executable not found, then returns empty String. Uses unsafeDupablePerformIO.