# File lib/puppet/file_serving/metadata.rb, line 50
50:     def collect
51:         real_path = full_path()
52:         stat = stat()
53:         @owner = stat.uid
54:         @group = stat.gid
55:         @ftype = stat.ftype
56: 
57: 
58:         # We have to mask the mode, yay.
59:         @mode = stat.mode & 007777
60: 
61:         case stat.ftype
62:         when "file"
63:             @checksum = ("{%s}" % @checksum_type) + send("%s_file" % @checksum_type, real_path).to_s
64:         when "directory" # Always just timestamp the directory.
65:             @checksum_type = "ctime"
66:             @checksum = ("{%s}" % @checksum_type) + send("%s_file" % @checksum_type, path).to_s
67:         when "link"
68:             @destination = File.readlink(real_path)
69:         else
70:             raise ArgumentError, "Cannot manage files of type %s" % stat.ftype
71:         end
72:     end