# File lib/puppet/network/handler/filebucket.rb, line 117 117: def getfile(md5, client = nil, clientip = nil) 118: bpath, bfile, bpaths = FileBucket.paths(@path,md5) 119: 120: unless FileTest.exists?(bfile) 121: # Try the old flat style. 122: bpath, bfile, bpaths = FileBucket.oldpaths(@path,md5) 123: unless FileTest.exists?(bfile) 124: return false 125: end 126: end 127: 128: contents = nil 129: File.open(bfile) { |of| 130: contents = of.read 131: } 132: 133: if client 134: return Base64.encode64(contents) 135: else 136: return contents 137: end 138: end