Sha256: a6c0a111401f7e1a6e1cf0c684d7f966b55d6847449da44e191aa16923b97569

Contents?: true

Size: 342 Bytes

Versions: 10

Compression:

Stored size: 342 Bytes

Contents

#!/usr/bin/env ruby
# -*- encoding: binary -*-

# Example of using IO.splice to copy a file
# This can be significantly faster than IO.copy_stream as data
# is never copied into userspace.

require 'io/splice'

usage = "#$0 SOURCE DEST"
source = ARGV.shift or abort usage
dest = ARGV.shift or abort usage
IO::Splice.copy_stream(source, dest)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
io_splice-4.2.0 examples/splice-cp.rb
io_splice-4.1.1 examples/splice-cp.rb
io_splice-4.1.0 examples/splice-cp.rb
io_splice-4.0.0 examples/splice-cp.rb
io_splice-3.1.0 examples/splice-cp.rb
io_splice-3.0.0 examples/splice-cp.rb
io_splice-2.2.0.18.g3025 examples/splice-cp.rb
io_splice-2.2.0 examples/splice-cp.rb
io_splice-2.1.0 examples/splice-cp.rb
io_splice-2.0.0 examples/splice-cp.rb