def copyfile(source, destination, buffer_size=1024 * 1024):
    source_descriptor = get_descriptor(source)
    destination_descriptor = get_descriptor(destination, read=False)

    while True:
        copy_buffer = source_descriptor.read(buffer_size)
        if copy_buffer:
            destination_descriptor.write(copy_buffer)
        else:
            break

    source_descriptor.close()
    destination_descriptor.close()
Return the mode of a file
dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/common/utils.py/copyfile--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/win_file.py/get_mode