# File lib/puppet/util/filetype.rb, line 264
264:     def write(text)
265:       require "tempfile"
266:       output_file = Tempfile.new("puppet")
267:       fh = output_file.open
268:       fh.print text
269:       fh.close
270: 
271:       # We have to chown the stupid file to the user.
272:       File.chown(Puppet::Util.uid(@path), nil, output_file.path)
273: 
274:       begin
275:         Puppet::Util.execute(["crontab", output_file.path], :uid => @path)
276:       rescue => detail
277:         raise Puppet::Error, "Could not write crontab for #{@path}: #{detail}"
278:       ensure
279:         output_file.delete
280:       end
281:     end