# File lib/fluent/plugin/buf_file.rb, line 33 def <<(data) @file.write(data) @size += data.bytesize end
# File lib/fluent/plugin/buf_file.rb, line 46 def close stat = @file.stat @file.close if stat.size == 0 File.unlink(@path) end end
# File lib/fluent/plugin/buf_file.rb, line 42 def empty? @size == 0 end
# File lib/fluent/plugin/buf_file.rb, line 71 def mv(path) File.rename(@path, path) @path = path end
# File lib/fluent/plugin/buf_file.rb, line 64 def open(&block) @file.pos = 0 yield @file end
# File lib/fluent/plugin/buf_file.rb, line 54 def purge @file.close File.unlink(@path) rescue nil # TODO rescue? end
Generated with the Darkfish Rdoc Generator 2.