Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Docs) Update find_file() comment in files.rb
Testing confirms that the `find_file()` function may indeed be used to verify the existence of a file specified by absolute path, with the caveat that this check appears to be performed prior to any resource changes made by the same code. The following code, when run via "puppet apply", accurately reports the existence or non-existence of a test file *before* deleting that file. ``` $testpath = '/tmp/testfile' file { $testpath: ensure => absent } if find_file($testpath) { notify { "$testpath exists.": } } else { notify { "$testpath does not exist.": } } ```
- Loading branch information