|
| System.FilePath.Manip | | Portability | Unix-like systems (requires flexible instances) | | Stability | unstable | | Maintainer | Bryan O'Sullivan <bos@serpentine.com> |
|
|
|
| Description |
|
|
| Synopsis |
|
|
|
| Documentation |
|
| class Streamable a where | Source |
|
| Type class for string manipulation over files.
| | | Methods | | | Read the entire contents of a Handle.
| | | | Write an entire string to a Handle.
|
|
|
|
|
| :: FilePath -> FilePath | function to rename with
| | -> FilePath | file to rename
| | -> IO () | | | Use a renaming function to generate a new name for a file, then
rename it.
|
|
|
|
| :: Streamable a | | | => FilePath -> FilePath -> IO () | transformation function
| | -> a -> a | | | -> FilePath | | | -> IO () | | Modify a file in place using the given function. The new content
is written to a temporary file. Once this is complete, the file
manipulation action is called. Its arguments are the names of the
original and temporary files.
Example:
modifyInPlace = modifyWith (flip rename)
|
|
|
|
| :: Streamable a | | | => FilePath -> FilePath | transformation function
| | -> a -> a | name of file to modify
| | -> FilePath | | | -> IO () | | Modify a file in place using the given function. The original
copy of the file is saved under a new name. This is performed by
writing to a temporary file; renaming the original file to its new
name; then renaming the temporary file to the original name.
Example:
-- save original file with a ".bak" extension
modifyWithBackup (<.> "bak")
|
|
|
|
| :: Streamable a | | | => a -> a | name of file to modify
| | -> FilePath | | | -> IO () | | | Modify a file in place using the given function. This is
performed by writing to a temporary file, then renaming it on top of
the existing file when done.
|
|
|
| Produced by Haddock version 2.6.0 |