def _copy_files_to_target_filesystem(self, source_filesystem_path: str,
                                         target_filesystem_path: str) -> bool:
        """ copy files to remote filesystem
            - untar if file is tared
            - copy files to remote filesystem

        Args:
            source_filesystem_path (str): local filesystem
            target_filesystem_path (str): remote filesystem

        Returns:
            bool: whether success
        """
        temp_path = source_filesystem_path
        if source_filesystem_path.find('.tar') != -1:
            temp_path = os.path.abspath(
                os.path.join(source_filesystem_path, '../tmp'))
            os.makedirs(temp_path)
            TarCli.untar_file(source_filesystem_path, temp_path)

        for root, dirs, files in os.walk(temp_path):
            relative_path = os.path.relpath(root, temp_path)
            for f in files:
                file_path = os.path.join(root, f)
                remote_file_path = os.path.join(target_filesystem_path,
                                                relative_path, f)
                self._file_client.copy(file_path, remote_file_path)
            for d in dirs:
                remote_dir_path = os.path.join(target_filesystem_path,
                                               relative_path, d)
                self._file_client.mkdir(remote_dir_path)

        return True
 copy files to remote filesystem
            - untar if file is tared
            - copy files to remote filesystem

        Args:
            source_filesystem_path (str): local filesystem
            target_filesystem_path (str): remote filesystem

        Returns:
            bool: whether success
        
web_console_v2/api/fedlearner_webconsole/sparkapp/service.py