def clean_loaded_file_data():
        """Perform setups to cancel loading file.

        Works by deleting attributes from the APP_REFS
        whose existence trigger file loading operations.

        Also cleans up data which won't be needed anymore.
        """
        ### delete the swap path if the attribute exists

        try:
            swap_path = APP_REFS.swap_path
        except AttributeError:
            pass
        else:
            swap_path.unlink()

        ### delete attributes holding paths whose existence
        ### indicate the need to load a file, if such attributes
        ### exisst

        for attr_name in ("source_path", "swap_path"):

            try:
                delattr(APP_REFS, attr_name)
            except AttributeError:
                pass

        ### also clean up data from a possible previous
        ### session thay may still exist
        APP_REFS.data.clear()
Perform setups to cancel loading file.

        Works by deleting attributes from the APP_REFS
        whose existence trigger file loading operations.

        Also cleans up data which won't be needed anymore.
        
nodezator/winman/fileop.py