getWorkingDirectory/changeWorkingDirectory

Brandon Allbery allbery.b at gmail.com
Wed Dec 4 14:19:48 UTC 2013


On Wed, Dec 4, 2013 at 8:38 AM, Benjamin Franksen <
benjamin.franksen at helmholtz-berlin.de> wrote:

> Module System.Posix.Directory of the unix package defines
>
>   getWorkingDirectory :: IO FilePath
>   changeWorkingDirectory :: FilePath -> IO ()
>
> I believe the functionality is quite portable and not limited to unix-like
> systems. I know that e.g. Windows has chdir and getcwd. Module Filesystem
> of
> the system-fileio package has
>

The functionality is similar but different, insofar as Windows still has
legacy drive paths and the current directory is maintained separately for
each one; I would expect this to be exposed in a Windows version.

That said, there are already setCurrentDirectory and getCurrentDirectory in
System.Directory for portable versions.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-prime/attachments/20131204/bd787c22/attachment.html>


More information about the Haskell-prime mailing list