[cfe-dev] [libc++] Better implementations of filesystem::copy_file

Eric Fiselier via cfe-dev cfe-dev at lists.llvm.org
Thu Jul 19 20:20:09 PDT 2018


Hi Tim,

Thanks for the input. `copyfile` is perfect. So libc++ can use sendfile on
Linux, copyfile on OS X.

Does anybody know some FreeBSD tricks we can use?

/Eric


On Thu, Jul 19, 2018 at 6:21 AM Tim Northover <t.p.northover at gmail.com>
wrote:

> Hi Eric,
>
> On Thu, 19 Jul 2018 at 09:08, Eric Fiselier via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
> > So I proffer the question to the brilliant LLVM community  What's the
> best way to optimize copying a file? Platform specific suggestions are more
> than welcomed.
>
> It looks like macOS's "cp" utility uses the "copyfile" function, and
> there's an "fcopyfile" variant that works on file descriptors. On the
> "you had one job" principle I'd hope that was a good way to do it on
> macOS, but I'm not really an expert.
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180719/fa63c935/attachment.html>


More information about the cfe-dev mailing list