FW: Cross platform file manipulations

Henning Thielemann lemming at henning-thielemann.de
Sat Jul 24 15:08:01 EDT 2010

Simon Peyton-Jones schrieb:

> I'm converting my Ruby script to Haskell. I found several problems of
> Haskell which does not exist in another script languages:
> - getModificationTime exists in System.Directory. But getAccessTime,
>   getStatusChangeTime, getCreationTime do not exist.
> - getModificationTime returns obsoleted type, ClockTime. It should
>   return modern type, UTCTime, I believe.
> - Path separator is not unified. Even though Windows accepts '/' as a
>   file separator, getCurrentDirectory in System.Directory returns '\\'
>   as a file separator. So, we need to specify regular expression like
>   this: "[/\\]foo[/\\]bar[/\\]baz". 

I think it is intended to have OS specific paths in FilePath values and
operate on them with OS specific functions as provided by the 'filepath'
package. Sure, an abstract FilePath type would be nice and was discussed
from time to time, but did get reality so far.

> - getHomeDirectory returns HOMEDRIVE/HOMEPATH instead of the HOME
>   environment variable on Windows.
> To fix these portability problems, I'm creating cross platform
> library to manipulate files:
> 	http://github.com/kazu-yamamoto/file
> Here are questions:
> 1) I use System.File as module name at this momoent. Is this too
>    radical? Should I use System.EasyFile or System.PortableFile?
> 2) Are there any standardization process for this? Should I wait for
>    the conclusion before releasing this package? Or can I register
>    the package to hackageDB whenever I like?

You may release at Hackage at any time and use package versions in order
to track larger changes.


> 3) Do you know other people who are interested in this area?

More information about the Libraries mailing list