Method: Bundler::CompactIndexClient::CacheFile#open
- Defined in:
- lib/bundler/compact_index_client/cache_file.rb
#open(write_mode = "wb", perm = @perm, &block) ⇒ Object
Open the temp file for writing, reusing original permissions, yielding the IO object.
94 95 96 97 98 99 100 101 |
# File 'lib/bundler/compact_index_client/cache_file.rb', line 94 def open(write_mode = "wb", perm = @perm, &block) raise ClosedError, "Cannot reopen closed file" if @closed SharedHelpers.filesystem_access(path, :write) do path.open(write_mode, perm) do |f| yield digests? ? Gem::Package::DigestIO.new(f, @digests) : f end end end |