copy_file_range
Function parameters
Parameters
Functions in this namespace
Functions
Error sets in this namespace
Error Sets
Source
Implementation
pub fn copy_file_range(fd_in: fd_t, off_in: ?*i64, fd_out: fd_t, off_out: ?*i64, len: usize, flags: u32) CopyFileRangeError!usize {
const rc = std.c.copy_file_range(fd_in, off_in, fd_out, off_out, len, flags);
switch (errno(rc)) {
.SUCCESS => return @intCast(rc),
.BADF => return error.BadFileFlags,
.FBIG => return error.FileTooBig,
.INTR => return error.Interrupted,
.INVAL => return error.InvalidArguments,
.IO => return error.InputOutput,
.INTEGRITY => return error.CorruptedData,
.ISDIR => return error.IsDir,
.NOSPC => return error.NoSpaceLeft,
else => |err| return unexpectedErrno(err),
}
}