diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-03-02 19:04:43 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-03-02 19:04:43 -0400 |
| commit | dfd95122ccb70d867995b133845eb4b63c054d1b (patch) | |
| tree | 011318acc6ab8bbb5b94b1fd9b34365bdd61eb0a /src/Propellor/Property/File.hs | |
| parent | 42d648723d79a116e5fbf840af095c517818cf58 (diff) | |
| parent | e83fccd24947c0dad36b079b3acd4d645edac01b (diff) | |
Merge branch 'master' into joeyconfig
Diffstat (limited to 'src/Propellor/Property/File.hs')
| -rw-r--r-- | src/Propellor/Property/File.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Propellor/Property/File.hs b/src/Propellor/Property/File.hs index 869fa48b..459fe2c7 100644 --- a/src/Propellor/Property/File.hs +++ b/src/Propellor/Property/File.hs @@ -20,6 +20,12 @@ f `hasContent` newcontent = fileProperty (\_oldcontent -> newcontent) f -- | Ensures that a line is present in a file, adding it to the end if not. +-- +-- For example: +-- +-- > & "/etc/default/daemon.conf" `File.containsLine` ("cachesize = " ++ val 1024) +-- +-- The above example uses `val` to serialize a `ConfigurableValue` containsLine :: FilePath -> Line -> Property UnixLike f `containsLine` l = f `containsLines` [l] |
