Error Set CopyFileRangeError [src]
Errors
If infd is not open for reading or outfd is not open for writing, or opened for writing with O_APPEND, or if infd and outfd refer to the same file.
Corrupted data was detected while reading from a file system.
If the copy exceeds the process's file size limit or the maximum file size for the file system outfd re- sides on.
An I/O error occurred while reading/writing the files.
A signal interrupted the system call before it could be completed. This may happen for files on some NFS mounts. When this happens, the values pointed to by inoffp and outoffp are reset to the initial values for the system call.
One of:
- infd and outfd refer to the same file and the byte ranges overlap.
- The flags argument is not zero.
- Either infd or outfd refers to a file object that is not a regular file.
Either infd or outfd refers to a directory.
File system that stores outfd is full.
The files referred to by fd_in and fd_out are not on the same filesystem, and the source and target filesystems are not of the same type, or do not support cross-filesystem copy.
(since Linux 5.19) the filesystem does not support this operation.
The requested source or destination range is too large to represent in the specified data types.
fd_out refers to an immutable file.
Either fd_in or fd_out refers to an active swap file.
The Operating System returned an undocumented error code.
This error is in theory not possible, but it would be better to handle this error than to invoke undefined behavior.
When this error code is observed, it usually means the Zig Standard Library needs a small patch to add the error code to the error set for the respective function.
Source
pub const CopyFileRangeError = std.os.freebsd.CopyFileRangeError || std.os.linux.wrapped.CopyFileRangeError