FW: Cross platform file manipulations

Simon Peyton-Jones simonpj at microsoft.com
Thu Jul 22 03:18:39 EDT 2010

Libraries folk: please respond to Kazu's questions.

Kazu: there is a standardisation process, for proposing library changes, described here: http://www.haskell.org/haskellwiki/Library_submissions


-----Original Message-----
From: Kazu Yamamoto [mailto:kazu at iij.ad.jp] 
Sent: 22 July 2010 03:38
To: Simon Peyton-Jones
Subject: Cross platform file manipulations

Hello Simon,

I have posted this to Haskell cafe but I did not have good
responses. So, I need your suggestion.

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". 
- 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:


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?

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

Thanks in advance.


More information about the Libraries mailing list