cabal-install-3.10.2.1: The command-line interface for Cabal and Hackage.

Safe Haskell | None
Language | Haskell2010

Distribution.Client.SavedFlags

Synopsis

- readCommandFlags :: FilePath -> CommandUI flags -> IO flags
- writeCommandFlags :: Verbosity -> FilePath -> CommandUI flags -> flags -> IO ()
- readSavedArgs :: FilePath -> IO (Maybe [String])
- writeSavedArgs :: Verbosity -> FilePath -> [String] -> IO ()

# Documentation

readCommandFlags :: FilePath -> CommandUI flags -> IO flags #

Read command-line arguments, separated by null characters, from a file. Returns the default flags if the file does not exist.

writeCommandFlags :: Verbosity -> FilePath -> CommandUI flags -> flags -> IO () #

Write command-line flags to a file, separated by null characters. This format is also suitable for the `xargs -0` command. Using the null character also avoids the problem of escaping newlines or spaces, because unlike other whitespace characters, the null character is not valid in command-line arguments.

readSavedArgs :: FilePath -> IO (Maybe [String]) #

writeSavedArgs :: Verbosity -> FilePath -> [String] -> IO () #