parameters: (project, project_path, export_path, silent)
docstring: Copies the code and solutions to the backup folder.
docstring_summary: Copies the code and solutions to the backup folder.
docstring_tokens: Copies the code and solutions to the backup folder .
function: def copy_code(project, project_path, export_path, silent):
      """
      Copies the code and solutions to the backup folder.
      """
      code_dir = project.cmakelists_dir()
      copy_directory(project_path, export_path, code_dir, silent=silent)
  
      # Also try copying the solutions folder if available
      solutions_dir = "solutions"
      copy_directory(project_path, export_path, solutions_dir,
                     warn_on_fail=False, silent=silent)
function_tokens: def copy_code ( project , project_path , export_path , silent ) : code_dir = project . cmakelists_dir ( ) copy_directory ( project_path , export_path , code_dir , silent = silent ) # Also try copying the solutions folder if available solutions_dir = "solutions" copy_directory ( project_path , export_path , solutions_dir , warn_on_fail = False , silent = silent )