← Back to Cfengine Reference

Files stanza

Within a files: section you can reference the following body parts and items. Body parts (i.e., compound bodies) are links that open to show all of their components.

Directive Type Description
changesbodyDetermine how changes are detected to the applicable file(s).
copy_frombodyCopy file(s) locally or from a server.
createmenu item
true/false
Whether to create the file.
files:
  "/path/plain_file"
    create =>   "true";
deletebodyDelete local file(s).
depth_searchbodyControls recursion, exclusions, &c.
edit_linebundleSpecifications of how to edit a file.
edit_xmlbundleOn-line ref manual has no data on this.
edit_defaultsbodySets options to apply to editing.
file_selectbodySpecifications for choosing sets of files.
link_frombodyCreate a symbolic link to a file
move_obstructionsmenu option
true/false
Whether to move any target item that is blocking an operation.
pathtypemenu option
literal/regex/guess
Is the path spec literal or a regex? Default is guess, but specifying will reduce CPU cycles.
permsbodySpecify permission attributes of a file.
renamebodyParameters controlling the renaming of a file.
repositorystringName of a repository for versioning.
files:
 "/path/file"
  copy_from => source,
  repository => "/var/cfengine/repository";
touchmenu option
true/false
Touch time stamp.
files:
 "/path/file"
  touch => "true";
transformerstringA command to execute to transform the file to something else (e.g., Sendmail newaliases command is used to transform the aliases file after it is edited).