[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Determining application directory

Subject: Re: [Haskell-cafe] Determining application directory
From: Rahul Kapoor
Date: Wed, 27 Jan 2010 12:31:19 -0500
> 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?

The System.Directory module has some methods to get specific
directory names in an OS agnostic manner.

The closest method that matches what you want
is "getAppUserDataDirectory" which uses the windows API function
SHGetFolderPath to get the folder for well known name. IIRC
Windows supports a notion of "Constant special item"'s and if
getAppUserDataDirectory does not do what you want you can call
SHGetFolderPath using the CSIDL you are interested in.  The code
to do so should be identical to the source
for "getAppUserDataDirectory"

CSIDL'a are listed here [1]

[1] http://msdn.microsoft.com/en-us/library/bb762494%28VS.85%29.a
Haskell-Cafe mailing list
[email protected]

<Prev in Thread] Current Thread [Next in Thread>