bdcs-0.5.0: Tools for managing a content store of software packages

Safe HaskellNone
LanguageHaskell2010

BDCS.Export.FSTree

Synopsis

Documentation

type FSEntry = (FilePath, Maybe Files) Source #

A single node within a file system tree. The pair is a single path component (e.g., "c" for the node at "ab/c"), and maybe a Files object. Automatically created parent directories will use Nothing as the snd element.

type FSTree = Tree FSEntry Source #

A tree of file system entries.

addFileToTree Source #

Arguments

:: MonadError String m 
=> Bool

Whether to replace the file if the path already exists

-> FSTree

The original tree

-> Files

The file to add

-> m FSTree 

Add a Files object to a FSTree. Will optionally replace existing paths, or throw an error. This function cannot replace a directory with a regular file, or vice versa.