@@ -128,6 +128,9 @@ pub type CCStatus = i32;
128128pub type CCCryptorStatus = i32 ;
129129pub type CCRNGStatus = :: CCCryptorStatus ;
130130
131+ pub type copyfile_state_t = * mut :: c_void ;
132+ pub type copyfile_flags_t = u32 ;
133+
131134deprecated_mach ! {
132135 pub type mach_timebase_info_data_t = mach_timebase_info;
133136}
@@ -4611,6 +4614,43 @@ pub const RUSAGE_INFO_V2: ::c_int = 2;
46114614pub const RUSAGE_INFO_V3 : :: c_int = 3 ;
46124615pub const RUSAGE_INFO_V4 : :: c_int = 4 ;
46134616
4617+ // copyfile.h
4618+ pub const COPYFILE_ACL : :: copyfile_flags_t = 1 << 0 ;
4619+ pub const COPYFILE_STAT : :: copyfile_flags_t = 1 << 1 ;
4620+ pub const COPYFILE_XATTR : :: copyfile_flags_t = 1 << 2 ;
4621+ pub const COPYFILE_DATA : :: copyfile_flags_t = 1 << 3 ;
4622+ pub const COPYFILE_SECURITY : :: copyfile_flags_t = COPYFILE_STAT | COPYFILE_ACL ;
4623+ pub const COPYFILE_METADATA : :: copyfile_flags_t = COPYFILE_SECURITY | COPYFILE_XATTR ;
4624+ pub const COPYFILE_RECURSIVE : :: copyfile_flags_t = 1 << 15 ;
4625+ pub const COPYFILE_CHECK : :: copyfile_flags_t = 1 << 16 ;
4626+ pub const COPYFILE_EXCL : :: copyfile_flags_t = 1 << 17 ;
4627+ pub const COPYFILE_NOFOLLOW_SRC : :: copyfile_flags_t = 1 << 18 ;
4628+ pub const COPYFILE_NOFOLLOW_DST : :: copyfile_flags_t = 1 << 19 ;
4629+ pub const COPYFILE_MOVE : :: copyfile_flags_t = 1 << 20 ;
4630+ pub const COPYFILE_UNLINK : :: copyfile_flags_t = 1 << 21 ;
4631+ pub const COPYFILE_NOFOLLOW : :: copyfile_flags_t = COPYFILE_NOFOLLOW_SRC | COPYFILE_NOFOLLOW_DST ;
4632+ pub const COPYFILE_PACK : :: copyfile_flags_t = 1 << 22 ;
4633+ pub const COPYFILE_UNPACK : :: copyfile_flags_t = 1 << 23 ;
4634+ pub const COPYFILE_CLONE : :: copyfile_flags_t = 1 << 24 ;
4635+ pub const COPYFILE_CLONE_FORCE : :: copyfile_flags_t = 1 << 25 ;
4636+ pub const COPYFILE_RUN_IN_PLACE : :: copyfile_flags_t = 1 << 26 ;
4637+ pub const COPYFILE_DATA_SPARSE : :: copyfile_flags_t = 1 << 27 ;
4638+ pub const COPYFILE_PRESERVE_DST_TRACKED : :: copyfile_flags_t = 1 << 28 ;
4639+ pub const COPYFILE_VERBOSE : :: copyfile_flags_t = 1 << 30 ;
4640+ pub const COPYFILE_RECURSE_ERROR : :: c_int = 0 ;
4641+ pub const COPYFILE_RECURSE_FILE : :: c_int = 1 ;
4642+ pub const COPYFILE_RECURSE_DIR : :: c_int = 2 ;
4643+ pub const COPYFILE_RECURSE_DIR_CLEANUP : :: c_int = 3 ;
4644+ pub const COPYFILE_COPY_DATA : :: c_int = 4 ;
4645+ pub const COPYFILE_COPY_XATTR : :: c_int = 5 ;
4646+ pub const COPYFILE_START : :: c_int = 1 ;
4647+ pub const COPYFILE_FINISH : :: c_int = 2 ;
4648+ pub const COPYFILE_ERR : :: c_int = 3 ;
4649+ pub const COPYFILE_PROGRESS : :: c_int = 4 ;
4650+ pub const COPYFILE_CONTINUE : :: c_int = 0 ;
4651+ pub const COPYFILE_SKIP : :: c_int = 1 ;
4652+ pub const COPYFILE_QUIT : :: c_int = 2 ;
4653+
46144654cfg_if ! {
46154655 if #[ cfg( libc_const_extern_fn) ] {
46164656 const fn __DARWIN_ALIGN32( p: usize ) -> usize {
@@ -5267,6 +5307,19 @@ extern "C" {
52675307 flags : u32 ,
52685308 ) -> :: c_int ;
52695309
5310+ pub fn copyfile (
5311+ from : * const :: c_char ,
5312+ to : * const :: c_char ,
5313+ state : copyfile_state_t ,
5314+ flags : copyfile_flags_t ,
5315+ ) -> :: c_int ;
5316+ pub fn fcopyfile (
5317+ from : :: c_int ,
5318+ to : :: c_int ,
5319+ state : copyfile_state_t ,
5320+ flags : copyfile_flags_t ,
5321+ ) -> :: c_int ;
5322+
52705323 // Added in macOS 10.13
52715324 // ISO/IEC 9899:2011 ("ISO C11") K.3.7.4.1
52725325 pub fn memset_s ( s : * mut :: c_void , smax : :: size_t , c : :: c_int , n : :: size_t ) -> :: c_int ;
0 commit comments