---
name: "do_splice_direct"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/do_splice_direct"
---

# do\_splice\_direct(9)

splices data directly between two files

## NAME

do\_splice\_direct - splices data directly between two files

## SYNOPSIS

**long do\_splice\_direct(struct file \*** *in***, loff\_t \*** *ppos***, struct file \*** *out***, loff\_t \*** *opos***, size\_t** *len***, unsigned int** *flags***);**

## ARGUMENTS

*in*

file to splice from

*ppos*

input file offset

*out*

file to splice to

*opos*

output file offset

*len*

number of bytes to splice

*flags*

splice modifier flags

## DESCRIPTION

For use by **do\_sendfile**. splice can easily emulate sendfile, but doing it in the application would incur an extra system call (splice in + splice out, as compared to just **sendfile**). So this helper can splice directly through a process-private pipe.

## COPYRIGHT
