[Haskell-cafe] ANN: FileManip 0.1, an expressive file manipulation library

Bryan O'Sullivan bos at serpentine.com
Wed May 2 02:24:10 EDT 2007


The FileManip package provides expressive functions and combinators for 
searching, matching, and manipulating files.

It provides three modules.

System.FilePath.Find lets you search a filesystem hierarchy efficiently:

   find always (extension ==? ".rb") >>= mapM_ remove

System.FilePath.GlobPattern lets you perform glob-style pattern 
matching, without going through a regexp engine:

   "foo.c" ~~ "*.c"
      ==> True

System.FilePath.Manip lets you rename files procedurally, edit files in 
place, or save old copies as backups:

   modifyWithBackup (<.> "bak")
                    (unlines . map (takeWhile (/= ',')) . lines)
                    "myPoorFile.csv"


More information about the Haskell-Cafe mailing list