| Path: | lib/puppet/type/file.rb |
| Last Update: | Fri Aug 03 10:17:44 +0000 2012 |
| CREATORS | = | [:content, :source, :target] |
| SOURCE_ONLY_CHECKSUMS | = | [:none, :ctime, :mtime] |
Files handle paths specially, because they just lengthen their path names, rather than including the full parent‘s title each time.
There are some cases where all of the work does not get done on file creation/modification, so we have to do some extra checking.
Recursively generate a list of file resources, which will be used to copy remote files, manage local files, and/or make links to map to another directory.
This is to fix bug 2296, where two files recurse over the same set of files. It‘s a rare case, and when it does happen you‘re not likely to have many actual conflicts, which is good, because this is a pretty inefficient implementation.
Set the checksum, from another property. There are multiple properties that modify the contents of a file, and they need the ability to make sure that the checksum value is in sync.
Should this thing be a normal file? This is a relatively complex way of determining whether we‘re trying to create a normal file, and it‘s here so that the logic isn‘t visible in the content property.
We have to hack this just a little bit, because otherwise we‘ll get an error when the target and the contents are created as properties on the far side.
Write out the file. Requires the property name for logging. Write will be done by the content property, along with checksum computation