def save_as(self):
        """Save data in new file and keep using new file.

        Works by saving the data in the new location
        provided by the user via the file manager
        session we start and using that new location from
        then on.

        Other admin taks are also performed like deleting
        the swap file for the original file.
        """
        ### prompt user to pick filepath from file manager

        paths = (
            select_paths(
                caption=SAVE_AS_CAPTION,
                path_name='new_file_name.ndz',
                expecting_files_only=True,
            )
        )

        ### respond according to whether paths were given

        ## if paths were given, it is a single one, we
        ## should assign it to 'filepath' variable
        if paths:
            filepath = paths[0]

        ## if the user didn't provide paths, though,
        ## return earlier
        else:
            return


        ### perform tasks to save current file in the
        ### provided path, using it from now on

        ### if the path doesn't have the right extension,
        ### ask user if we should add it ourselves or
        ### cancel the operation (in which case we just return)

        if filepath.suffix != NATIVE_FILE_EXTENSION:

            ## build custom message

            message = (
                "Path provided must have a"
                f" {NATIVE_FILE_EXTENSION} extension."
                " Want us to add it for you?"
            )

            ## each button is represented by a pair
            ## consisting of the text of the button and
            ## the value the dialog returns when we
            ## click it

            buttons = [("Yes", True), ("No, cancel saving new file", False)]

            ## display the dialog and store the answer
            ## provided by the user when clicking
            answer = (
                create_and_show_dialog(message, buttons, level_name='info')
            )

            ## if the answer is falsy, then cancel operation
            if not answer:
                return

            ## otherwise apply the correct extension

            else:
                filepath = filepath.with_suffix(NATIVE_FILE_EXTENSION)

        ### if path already exists, prompt user to confirm
        ### whether we should override it

        if filepath.exists():

            ## build custom message

            message = (
                f"The path provided ({filepath}) already exists."
                " Should we override it?"
            )

            ## each button is represented by a pair
            ## consisting of the text of the button and
            ## the value the dialog returns when we
            ## click it

            buttons = [
                ("Yes, override", True),
                ("No, cancel saving new file", False),
            ]

            ## display the dialog and store the answer
            ## provided by the user when clicking
            answer = (
                create_and_show_dialog(message, buttons, level_name='info')
            )

            ### if the answer is falsy, then we shouldn't
            ### override, so we cancel the operation by
            ### returning
            if not answer:
                return

        ### otherwise we proceed

        ### backup the current source path
        original_source = APP_REFS.source_path

        ### assign the new file as the source the be used
        ### instead
        APP_REFS.source_path = filepath

        ### try saving current data on the new path
        try:
            self.save_data()

        ### if something goes wrong, restore the original
        ### source, notify user and cancel the operation
        ### by returning

        except Exception as err:

            ## restore source
            APP_REFS.source_path = original_source

            ## notify user

            message = (
                "An error ocurred while trying to save the data"
                " (with the \"Save as...\" operation."
            )

            logger.exception(message)

            USER_LOGGER.exception(message)

            ## build and display error message

            dialog_message = message + (
                " Check the user log for details (press Ctrl+Shift+j"
                " after leaving this dialog or access the \"Help >"
                " Show user log\" option on menubar)."
            )

            create_and_show_dialog(dialog_message, level_name='error')

            ## cancel by returning
            return

        ### otherwise, again, we proceed

        ### delete the contents of the current swap path
        APP_REFS.swap_path.unlink()

        ### create a swap path for the new source and store
        ### it

        swap_path = get_swap_path(filepath)
        APP_REFS.swap_path = swap_path

        ### save contents of source in the swap path

        source_contents = filepath.read_text(encoding="utf-8")

        swap_path.write_text(source_contents, encoding="utf-8")

        ### store new path as a recently open file, so it is
        ### available in the menubar under the "File > Open recent"
        ### submenu
        store_recent_file(APP_REFS.source_path)

        ### get a custom string representation for the source
        path_str = get_custom_path_repr(filepath)

        ### update caption to show the new loaded path
        self.put_path_on_caption(path_str)

        ### notify user by displaying message in the
        ### statusbar
        set_status_message(f"Using new file from now on {path_str}")
Save data in new file and keep using new file.

        Works by saving the data in the new location
        provided by the user via the file manager
        session we start and using that new location from
        then on.

        Other admin taks are also performed like deleting
        the swap file for the original file.
        
nodezator/winman/fileop.py