Files
php-src/win32
Jakub ZelenkaandDavid Carlier 32a0f3b6cf IO copy API for stream copying (#20399)
This introduces new API for fd copying and modifies
php_stream_copy_to_stream_ex to use it. The implementation is separated
for various platforms and the end result have couple of implications:

- sendfile is used for copying file to generic fd (e.g. sockets) on all
  platforms except Windows that use TransmitFile
- splice is used for copying between generic fds (e.g. sockets) on
  Linux
- copy_file_range should get used on alpine linux with directly using
  syscall (as musl does not seem to implement it)
- copy_file_range is used in the loop so it is used multiple times for
  files bigger than 2GB on Linux.
- file mmap for copying is removed as it allowed crashing PHP when
  another process modified mapped file - this was used as a fallback
  for file copying. Sendfile should partially replace it.
- File to file copying was optimized on Windows with use of ReadFile
  and WriteFile.

This also adds various tests including Linux unit tests.

Closes GH-20399

Co-authored-by: David Carlier <devnexen@gmail.com>
2026-07-19 17:15:16 +02:00
..
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00
2019-02-03 21:03:00 +01:00
2018-01-03 14:38:00 +01:00
2026-04-11 21:20:54 -05:00
2025-02-05 14:13:56 +01:00
2019-02-03 21:03:00 +01:00
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00
2019-02-03 21:03:00 +01:00
2025-02-05 14:13:56 +01:00
2023-07-07 18:02:32 +02:00
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00
2026-05-06 13:11:01 +02:00
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00
2024-08-14 21:09:26 +02:00
2019-02-03 21:03:00 +01:00
2026-04-11 21:20:54 -05:00
2026-04-11 21:20:54 -05:00