Method: Warc::Stream#write_record
- Defined in:
- lib/warc/stream.rb
#write_record(record) ⇒ Object
75 76 77 78 79 80 81 |
# File 'lib/warc/stream.rb', line 75 def write_record(record) # Go to end of file @file_handle.seek(0,::IO::SEEK_END) expected_size = record.header.content_length + @file_handle.tell next_file_handle if (expected_size > @options[:max_filesize]) record.offset = @file_handle.tell end |