1 # -*- encoding: binary -*-
7 # here are internal implementation details, do not use them in your code
9 if IO.respond_to?(:copy_stream)
10 def copy_stream(src, dst)
11 IO.copy_stream(src, dst)
14 def copy_stream(src, dst)
18 src.readpartial(0x4000, buf)
19 written += dst.write(buf)
27 class StoreContent < Proc
28 def initialize(total_size, &writer_proc)
29 @total_size = total_size
41 # Timeout error class. Subclassing it from Timeout::Error is the only
42 # reason we require the 'timeout' module, otherwise that module is
43 # broken and worthless to us.
44 class MogileFS::Timeout < Timeout::Error; end