Error Set CopyFileRangeError [src]

Errors

BadFileFlags CopyFileRangeError

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.

CorruptedData CopyFileRangeError

Corrupted data was detected while reading from a file system.

FileTooBig CopyFileRangeError

If the copy exceeds the process's file size limit or the maximum file size for the file system outfd re- sides on.

InputOutput CopyFileRangeError

An I/O error occurred while reading/writing the files.

Interrupted CopyFileRangeError

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.

InvalidArguments CopyFileRangeError

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.
IsDir CopyFileRangeError

Either infd or outfd refers to a directory.

NoSpaceLeft CopyFileRangeError

File system that stores outfd is full.

NotSameFileSystem CopyFileRangeError

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.

OperationNotSupported CopyFileRangeError

(since Linux 5.19) the filesystem does not support this operation.

OutOfMemory CopyFileRangeError
Overflow CopyFileRangeError

The requested source or destination range is too large to represent in the specified data types.

PermissionDenied CopyFileRangeError

fd_out refers to an immutable file.

SwapFile CopyFileRangeError

Either fd_in or fd_out refers to an active swap file.

Unexpected UnexpectedError

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