| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
Description | |||||||||||||||
This module provides various helpful utilities for dealing with path and file names, directories, and related support. Written by John Goerzen, jgoerzen@complete.org | |||||||||||||||
Synopsis | |||||||||||||||
| |||||||||||||||
Name processing | |||||||||||||||
splitExt :: String -> (String, String) | |||||||||||||||
Splits a pathname into a tuple representing the root of the name and the extension. The extension is considered to be all characters from the last dot after the last slash to the end. Either returned string may be empty. | |||||||||||||||
absNormPath | |||||||||||||||
| |||||||||||||||
secureAbsNormPath | |||||||||||||||
| |||||||||||||||
Directory Processing | |||||||||||||||
recurseDir :: HVFS a => a -> FilePath -> IO [FilePath] | |||||||||||||||
Obtain a recursive listing of all files/directories beneath the specified directory. The traversal is depth-first and the original item is always present in the returned list. If the passed value is not a directory, the return value be only that value. The "." and ".." entries are removed from the data returned. | |||||||||||||||
recurseDirStat :: HVFS a => a -> FilePath -> IO [(FilePath, HVFSStatEncap)] | |||||||||||||||
Like recurseDir, but return the stat() (System.Posix.Files.FileStatus) information with them. This is an optimization if you will be statting files yourself later. | |||||||||||||||
recursiveRemove :: HVFS a => a -> FilePath -> IO () | |||||||||||||||
Removes a file or a directory. If a directory, also removes all its child files/directories. | |||||||||||||||
Temporary Directories | |||||||||||||||
mktmpdir :: String -> IO String | |||||||||||||||
Creates a temporary directory for your use. The passed string should be a template suitable for mkstemp; that is, end with "XXXXXX". The name of the directory created will be returned. | |||||||||||||||
brackettmpdir :: String -> (String -> IO a) -> IO a | |||||||||||||||
Creates a temporary directory for your use via mktmpdir, runs the specified action (passing in the directory name), then removes the directory and all its contents when the action completes (or raises an exception. | |||||||||||||||
Produced by Haddock version 0.6 |