
2 May
2007
2 May
'07
6:24 a.m.
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"