class Bundler::CompactIndexClient::CacheFile

def self.copy(path, &block)

Initialize with a copy of the original file, then yield the instance.
def self.copy(path, &block)
  new(path) do |file|
    file.initialize_digests
    SharedHelpers.filesystem_access(path, :read) do
      path.open("rb") do |s|
        file.open {|f| IO.copy_stream(s, f) }
      end
    end
    yield file
  end
end