diff --git a/reference/functions/isnewerthan.markdown b/reference/functions/isnewerthan.markdown index cc222fd8b..198d6c3ce 100644 --- a/reference/functions/isnewerthan.markdown +++ b/reference/functions/isnewerthan.markdown @@ -9,8 +9,9 @@ published: true **Description:** Returns whether the file `newer` is newer (modified later) than the file `older`. -This function compares the modification time (mtime) of the files, referring -to changes of content only. +This function compares the modification time (mtime) of the files. Note that +access changes such as ownership and permissions as well as status changes +such as last time the file was read are not included in the mtime timestamp. [%CFEngine_function_attributes(newer, older)%] diff --git a/reference/functions/isnewerthantime.markdown b/reference/functions/isnewerthantime.markdown new file mode 100644 index 000000000..d3b289610 --- /dev/null +++ b/reference/functions/isnewerthantime.markdown @@ -0,0 +1,32 @@ +--- +layout: default +title: isnewerthantime +published: true +--- + +[%CFEngine_function_prototype(file, time)%] + +**Description:** Returns whether the file `file` is newer (modified later) +than the time `time`. + +This function compares the modification time (mtime) of the file. Note that +access changes such as ownership and permissions as well as status changes +such as last time the file was read are not included in the mtime timestamp. + +[%CFEngine_function_attributes(file, time)%] + +**Example:** + +Prepare: + +[%CFEngine_include_snippet(isnewerthantime.cf, #\+begin_src prep, .*end_src)%] + +Run: + +[%CFEngine_include_snippet(isnewerthantime.cf, #\+begin_src cfengine3, .*end_src)%] + +Output: + +[%CFEngine_include_snippet(isnewerthantime.cf, #\+begin_src\s+example_output\s*, .*end_src)%] + +**See also:** `isnewerthan()`