# File lib/puppet/type/file.rb, line 322
322:   def bucket
323:     return @bucket if @bucket
324: 
325:     backup = self[:backup]
326:     return nil unless backup
327:     return nil if backup =~ /^\./
328: 
329:     unless catalog or backup == "puppet"
330:       fail "Can not find filebucket for backups without a catalog"
331:     end
332: 
333:     unless catalog and filebucket = catalog.resource(:filebucket, backup) or backup == "puppet"
334:       fail "Could not find filebucket #{backup} specified in backup"
335:     end
336: 
337:     return default_bucket unless filebucket
338: 
339:     @bucket = filebucket.bucket
340: 
341:     @bucket
342:   end