def walk(self, action, user_data=None):
        """
        Walk the hierarchy, applying action to each filename.

        Args:
            action: callable, the callable to invoke for each filename,
                will be invoked with the filename, the subfiles, and
                the level in the sitemap.
        """
        action(self.index_file, self.__root, 0, user_data)
        self.__do_walk(self.__root, 1, action, user_data)
Walk the hierarchy, applying action to each filename.

        Args:
            action: callable, the callable to invoke for each filename,
                will be invoked with the filename, the subfiles, and
                the level in the sitemap.