(fsrc, fdst, flags)
Copy a regular file content or metadata by using high-performance
    fcopyfile(3) syscall (macOS).
Copy a regular file content or metadata by using high-performance
    fcopyfile(3) syscall (macOS).
Copy a regular file content or metadata by using high - performance fcopyfile ( 3 ) syscall ( macOS ) .
def _fastcopy_fcopyfile(fsrc, fdst, flags):
    """Copy a regular file content or metadata by using high-performance
    fcopyfile(3) syscall (macOS).
    """
    try:
        infd = fsrc.fileno()
        outfd = fdst.fileno()
    except Exception as err:
        raise _GiveupOnFastCopy(err)  # not a regular file

    try:
        posix._fcopyfile(infd, outfd, flags)
    except OSError as err:
        err.filename = fsrc.name
        err.filename2 = fdst.name
        if err.errno in {errno.EINVAL, errno.ENOTSUP}:
            raise _GiveupOnFastCopy(err)
        else:
            raise err from None
def _fastcopy_fcopyfile ( fsrc , fdst , flags ) : try : infd = fsrc . fileno ( ) outfd = fdst . fileno ( ) except Exception as err : raise _GiveupOnFastCopy ( err ) # not a regular file try : posix . _fcopyfile ( infd , outfd , flags ) except OSError as err : err . filename = fsrc . name err . filename2 = fdst . name if err . errno in { errno . EINVAL , errno . ENOTSUP } : raise _GiveupOnFastCopy ( err ) else : raise err from None