
I wrote several times that I want determine application directory under Windows only. Unix version will store its config in predefined location, in /etc. Anyway, one not subscribed man wrote me about special library to solve this problem - http://hackage.haskell.org/package/executable-path On Fri, Jan 29, 2010 at 11:16:25AM -0800, Scott A. Waterman wrote:
'FindBin' is also useful. http://hackage.haskell.org/package/FindBin
While System.Directory is quite useful, it doesn't contain a function to obtain the directory in which the running program lives. You can get the current (working) directory (e.g. unix's 'getpwd'), and you can try to find an executable by searching the $PATH, but you can't find the program you are currently running.
--ts
On Jan 27, 2010, at 9:06 AM, Matveev Vladimir wrote:
Hi, I'm writing cross-platform application in Haskell which should be running under Windows and Linux. Under Linux configuration is stored in the /etc directory, and under Windows configuration is meant to be in the application directory. So, is there a way to get an application directory path under Windows? I remember that there is a way to do this using WinAPI, but how to do this Haskell? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe