[Haskell-cafe] Determining application directory

Scott A. Waterman tswaterman at gmail.com
Fri Jan 29 14:16:25 EST 2010


'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 at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list