yieldplotlib.core.directory_node
================================

.. py:module:: yieldplotlib.core.directory_node

.. autoapi-nested-parse::

   Represents a directory containing multiple nodes (files or subdirectories).



Classes
-------

.. autoapisummary::

   yieldplotlib.core.directory_node.DirectoryNode


Module Contents
---------------

.. py:class:: DirectoryNode(directory_path)

   Bases: :py:obj:`yieldplotlib.core.node.Node`


   Represents a directory containing multiple nodes (files or subdirectories).


   .. py:attribute:: directory_path


   .. py:attribute:: directory_name


   .. py:attribute:: _children
      :value: []



   .. py:method:: load()

      Recursively scan directories and load all child nodes.



   .. py:method:: add(node)

      Add a child node to the directory.



   .. py:method:: get(key, **kwargs)

      Recursively search for data associated with the given key.



   .. py:method:: display_tree(level=0, max_children=5, prefix='')

      Recursively display the tree structure.

      Args:
          level (int):
              The current level of the tree.
          max_children (int):
              The maximum number of children to display.
          prefix (str):
              The prefix to display at the current level.



   .. py:method:: _create_directory_node(path)

      Create a directory node for the given path.



   .. py:method:: _create_file_node(path)

      Create a file node for the given path.



   .. py:method:: create_base_file(path)

      Create a base file node for the given path.



   .. py:method:: create_base_directory(path)

      Create a directory node for the given path.



