'transfer a file from local to remote'

def put_file(self, in_path, out_path):

    super(Connection, self).put_file(in_path, out_path)
    display.vvv(u'PUT    {0}    TO    {1}'.format(in_path, out_path), host=self.host)
    if (not os.path.exists(to_bytes(in_path, errors='surrogate_or_strict'))):
        raise AnsibleFileNotFound('file    or    module    does    not    exist:    {0}'.format(to_native(in_path)))
    return self._file_transport_command(in_path, out_path, 'put')
