BSD-3-Clause licensed and maintained by Kazu Yamamoto
This version can be pinned in stack with:easy-file-0.2.6@sha256:0528de73fe1c427d241d9bb49f518f5c752fa44162398953fecb309563acd0bc,1493

Module documentation for 0.2.6

Used by 1 package in nightly-2026-11-03(full list with versions):

GitHub Actions status

Easy file handling for Haskell

This is a Haskell package of cross-platform file handling for Unix/Mac/Windows.

The current Haskell modules have following shortcomings:

  • 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.

  • Some file functions are missing. A function to tell the link counter, for instance.

  • 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.

This package aims to resolve these problems.

Changes

v0.2.6

  • Supporting GHC 9.2 or later only.
  • Fixing setFileSize leaking a file handle on Windows.
  • hasSubDirectories returns Nothing on Windows instead of throwing an exception.
  • Documenting that timestamps are truncated to seconds and that canonicalizePath may return a path with \ on Windows.

v0.2.5

  • setFileSizer can be built but raises an error for GHC < 8.10.6. #10

v0.2.4

  • Providing setFileSize.

v0.2.3

  • Catching up the current environment (2018 -> 2023) #7

v0.2.2

  • win32 file open for getting metadata #5

v0.2.1

  • Fixing the document #3

v0.2.0

  • Providing getFileSize.