4 # SleepyPenguin.copy_file_range(src, dst, len[, keywords]) => # Integer
6 # Performs and in-kernel copy of +len+ bytes from +src+ to +dst+,
7 # where +src+ and +dst+ are regular files on the same filesystem.
8 # Returns the number of bytes copied, which may be less than
11 # +flags+ is currently unused, but may be specified in the future.
15 # :off_in and :off_out if non-nil may be used to specify an Integer
16 # offset for each respective descriptor. If specified, the file
17 # offsets of each file description will not be moved, providing
18 # pread(2)/pwrite(2)-like semantics.
20 # See copy_file_range(2) manpage for full documentation:
21 # http://man7.org/linux/man-pages/man2/copy_file_range.2.html
23 # This method only works in Linux 4.5+ with sleepy_penguin 3.5.0+,
24 # and may require up-to-date kernel headers for non-x86/x86-64 systems.
25 def self.copy_file_range(io_in, io_out, len, flags = 0,
26 off_in: nil, off_out: nil)
27 __cfr(io_in, off_in, io_out, off_out, len, flags)