propellor-0.6.0: property-based host configuration management in haskell

Safe HaskellNone

Propellor.Property.File

Synopsis

Documentation

hasContent :: FilePath -> [Line] -> PropertySource

Replaces all the content of a file.

hasPrivContent :: FilePath -> PropertySource

Ensures a file has contents that comes from PrivData.

The file's permissions are preserved if the file already existed. Otherwise, they're set to 600.

hasPrivContentExposed :: FilePath -> PropertySource

Leaves the file world-readable.

containsLine :: FilePath -> Line -> PropertySource

Ensures that a line is present in a file, adding it to the end if not.

lacksLine :: FilePath -> Line -> PropertySource

Ensures that a line is not present in a file. Note that the file is ensured to exist, so if it doesn't, an empty file will be written.

notPresent :: FilePath -> PropertySource

Removes a file. Does not remove symlinks or non-plain-files.

fileProperty' :: (FilePath -> String -> IO ()) -> Desc -> ([Line] -> [Line]) -> FilePath -> PropertySource

dirExists :: FilePath -> PropertySource

Ensures a directory exists.

ownerGroup :: FilePath -> UserName -> GroupName -> PropertySource

Ensures that a file/dir has the specified owner and group.

mode :: FilePath -> FileMode -> PropertySource

Ensures that a file/dir has the specfied mode.