.. versionadded:: 2019.2.0

    Copies the file on the remote Junos device.

    src
        The source file path. This argument accepts the usual Salt URIs (e.g.,
        ``salt://``, ``http://``, ``https://``, ``s3://``, ``ftp://``, etc.).

    dst
        The destination path on the device where to copy the file.

    CLI Example:

    .. code-block:: bash

        salt '*' napalm.junos_copy_file https://example.com/junos.cfg /var/tmp/myjunos.cfg

def junos_copy_file(src, dst, **kwargs):
    '''
    .. versionadded:: 2019.2.0

    Copies the file on the remote Junos device.

    src
        The source file path. This argument accepts the usual Salt URIs (e.g.,
        ``salt://``, ``http://``, ``https://``, ``s3://``, ``ftp://``, etc.).

    dst
        The destination path on the device where to copy the file.

    CLI Example:

    .. code-block:: bash

        salt '*' napalm.junos_copy_file https://example.com/junos.cfg /var/tmp/myjunos.cfg
    '''
    prep = _junos_prep_fun(napalm_device)  # pylint: disable=undefined-variable
    if not prep['result']:
        return prep
    cached_src = __salt__['cp.cache_file'](src)
    return __salt__['junos.file_copy'](cached_src, dst)