def send_sync(self):
        '''Send by rsync the bin folder into the specified directory.'''
        bin_dir = self.paths.bin
        user, ip, directory = self._rpi_settings
        rpi_directory = '%s/%s/' % (directory, self.paths.project_name)

        command = ('rsync -aq --rsync-path="mkdir -p ~/%s && rsync" -Pravdtze ssh %s/* %s@%s:%s'
                   % (rpi_directory, bin_dir, user, ip, rpi_directory))
        self.user_io.out.info('Sending with %s\n' % command)
        try:
            _, out = execute(command, self.user_io, cwd=bin_dir)
            if out:
                self.user_io.out.info("%s" % out)
        except Exception as e:
            raise ClientException('Sending bin folder\n'
                                  'ERROR: %s\n' % str(e))
dataset/ETHPy150Open biicode/client/dev/hardware/raspberry_pi/raspberrypi.py/RaspberryPi.send_sync/original