def METHOD_NAME(self, f, data_dir, overall_progress_update):
    filename = get_content_file_name(f)
    try:
        srcpath = paths.get_content_storage_file_path(filename)
        dest = paths.get_content_storage_file_path(filename, datafolder=data_dir)
    except InvalidStorageFilenameError:
        # If any files have an invalid storage file name, don't export them.
        overall_progress_update(f["file_size"])
        return
    # if the file already exists, add its size to our overall progress, and skip
    if os.path.isfile(dest) and os.path.getsize(dest) == f["file_size"]:
        overall_progress_update(f["file_size"])
        return
    copy = transfer.FileCopy(srcpath, dest, cancel_check=self.is_cancelled)
    with copy, self.start_progress(
        total=copy.transfer_size
    ) as file_cp_progress_update:
        def progress_update(length):
            self.exported_size = self.exported_size + length
            overall_progress_update(length)
            file_cp_progress_update(length)
        try:
            copy.run(progress_update=progress_update)
        except transfer.TransferCanceled:
            job = get_current_job()
            if job:
                job.extra_metadata["file_size"] = self.exported_size
                job.extra_metadata["total_resources"] = 0
                job.save_meta()
            return
    return dest