2007-05-02 01:55:51 -04:00
|
|
|
FileManip: expressive file manipulation
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
This package provides functions and combinators for searching,
|
|
|
|
matching, and manipulating files.
|
|
|
|
|
2007-06-24 12:30:41 -04:00
|
|
|
It provides four modules.
|
|
|
|
|
|
|
|
System.FilePath.Find lets you search a filesystem hierarchy efficiently:
|
|
|
|
|
|
|
|
find always (extension ==? ".pl") >>= mapM_ remove
|
|
|
|
|
|
|
|
System.FilePath.GlobPattern lets you perform glob-style pattern
|
|
|
|
matching, without going through a regexp engine:
|
|
|
|
|
|
|
|
"foo.c" ~~ "*.c" ==> True
|
|
|
|
|
|
|
|
System.FilePath.Glob lets you do simple glob-style file name searches:
|
|
|
|
|
|
|
|
namesMatching "*/*.c" ==> ["foo/bar.c"]
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
2007-05-02 01:55:51 -04:00
|
|
|
|
|
|
|
To build and install:
|
|
|
|
|
|
|
|
runhaskell Setup configure
|
|
|
|
runhaskell Setup build
|
|
|
|
runhaskell Setup install
|
|
|
|
|
|
|
|
|
|
|
|
To understand:
|
|
|
|
|
2007-05-02 02:05:52 -04:00
|
|
|
http://darcs.serpentine.com/filemanip/dist/doc/html/FileManip/
|
2007-05-02 01:55:51 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To contribute:
|
|
|
|
|
|
|
|
darcs get http://darcs.serpentine.com/filemanip
|
|
|
|
|
|
|
|
|
|
|
|
Contributors:
|
|
|
|
|
|
|
|
Bryan O'Sullivan
|