#include <sys/clonefile.h>
sys/clonefile.h
macroCLONE_NOFOLLOW
Options for clonefile calls
#define CLONE_NOFOLLOW 0x0001
Don't follow symbolic links
macroCLONE_RESOLVE_BENEATH
#define CLONE_RESOLVE_BENEATH 0x0010
path must reside in the hierarchy beneath the starting directory
functionclonefileat
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
int clonefileat(int, const char *, int, const char *, uint32_t)functionfclonefileat
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
int fclonefileat(int, int, const char *, uint32_t)functionclonefile
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
int clonefile(const char *, const char *, uint32_t)man page · June 3, 2021
clonefile(2) — create copy on write clones of files⚠ the man page prototype differs from the current header — man:
int clonefile(char*, char*, int) · header: int clonefile(char*, char*, unsigned)