A collection of file system utilities that appear to be missing from Directory, FilePath, Prelude, etc. Some of these may overlap with MissingH but the versions here will probably be more simplistic. Furthermore, this library is focused on this one thing and not a whole bunch of things.
- mtreeList :: Monad m => (a -> m [a]) -> a -> m [a]
- fileList :: FilePath -> IO [FilePath]
- walkDir :: FilePath -> IO [Directory]
- copyDir :: FilePath -> FilePath -> IO ()
- replaceRoot :: FilePath -> FilePath -> FilePath -> FilePath
- removeRoot :: FilePath -> FilePath -> FilePath
- data Directory
- dirPath :: Directory -> FilePath
- subDirs :: Directory -> [FilePath]
- files :: Directory -> [FilePath]
- createDir :: FilePath -> IO Directory
- filterUseless :: [FilePath] -> [FilePath]
Returns a list of nodes in a tree via a depth-first walk.
Recursively list the contents of a directory. Depth-first.
Walk a directory depth-first. Similar to Python's os.walk and fs.core/walk from the fs Clojure library.
Copy a directory recursively. Moves every file, creates every directory.
Given a root path, a new root path, and a path to be changed, removes the old root from the path and replaces it with to.
Given a root (prefix), remove it from a path. This is useful for getting the filename and subdirs of a path inside of a root.
We can use this data type to represent the pieces of a directory.