clod
Copyright(c) Fuzz Leonard 2025
LicenseMIT
Maintainercyborg@bionicfuzz.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Clod.Config

Description

This module provides functions for handling configuration options including environment variables and default values.

Synopsis

Configuration functions

configDirName :: IO String Source #

Get configuration directory name

Returns the configuration directory name, checking the CLOD_DIR environment variable first and falling back to ".clod" if not set.

configDir <- configDirName  -- Returns ".clod" or value of CLOD_DIR

clodIgnoreFile :: IO String Source #

Get clodignore file name

Returns the clodignore file name, checking the CLODIGNORE environment variable first and falling back to ".clodignore" if not set.

ignoreFile <- clodIgnoreFile  -- Returns ".clodignore" or value of CLODIGNORE

clodConfigDir :: FilePath -> IO FilePath Source #

Build the config directory path from project root

configDir <- clodConfigDir "pathtoproject"  -- Returns "pathtoproject/.clod" or environment override

getDataFileName :: FilePath -> IO FilePath Source #

Get the path to a data file included with the package This uses the Paths_clod module generated by Cabal