# File lib/puppet/provider/file/posix.rb, line 74
74:   def sync(path, links, should)
75:     # Set our method appropriately, depending on links.
76:     if links == :manage
77:       method = :lchown
78:     else
79:       method = :chown
80:     end
81: 
82:     uid = nil
83:     should.each do |user|
84:       break if uid = validuser?(user)
85:     end
86: 
87:     raise Puppet::Error, "Could not find user(s) #{should.join(",")}" unless uid
88: 
89:     begin
90:       File.send(method, uid, nil, path)
91:     rescue => detail
92:       raise Puppet::Error, "Failed to set owner to '#{uid}': #{detail}"
93:     end
94: 
95:     :file_changed
96:   end