lambdabot-4.3: Lambdabot is a development tool and advanced IRC bot

Safe HaskellNone

Lambdabot.File

Synopsis

Documentation

findLBFile :: FilePath -> LB (Maybe String)Source

Try to find a pre-existing file, searching first in ./State and then in ~.lambdabotState

findOrCreateLBFile :: FilePath -> LB StringSource

Complicated. If a file exists locally, we return that. If a file exists in ~lambdabotState, we return that. If neither the file nor ~lambdabotState exist, we create the directories and then copy the file into it if a template exists, or create an empty file if it does not. Note that the return type is simple so we can just do a binding and stuff it into the conventional functions easily; unfortunately, this removes error-checking, as an error is now just "".