63: def flush
64:
65:
66:
67:
68: if target
69: dir = File.dirname(target)
70: if not File.exist? dir
71: Puppet.debug("Creating directory %s which did not exist" % dir)
72: Dir.mkdir(dir, dir_perm)
73: end
74: end
75:
76:
77: super
78:
79:
80: if target and user
81: uid = Puppet::Util.uid(user)
82:
83: if uid
84: File.chown(uid, nil, dir)
85: File.chown(uid, nil, target)
86: else
87: raise Puppet::Error, "Specified user does not exist"
88: end
89: end
90:
91: if target
92: File.chmod(file_perm, target)
93: end
94: end