.. _matnwb-read-nwbfile-intro: Using the NwbFile Class ======================= The NwbFile class represents the root object for the NWB file and consists of properties and values which map indirectly to the internal HDF5 dataset. .. image:: /img/matnwb_NwbFile.png In most cases, the types contained in these files were generated by the embedded NWB schema in the file (or separately if you opted to generate them separately). These types can be traversed using regular MATLAB syntax for accessing properties and their values. Aside from the generated Core and Extension types, there are "Untyped" utility Types which are covered in greater detail in :ref:`matnwb-read-untyped-intro`. .. _matnwb-read-nwbfile-searchfor: Searching by Type ~~~~~~~~~~~~~~~~~ The NwbFile also allows for searching the entire NWB file by type using its ``searchFor`` method. You can search for only the class name: .. image:: /img/matnwb_searchForExample.png Or use the ``'includeSubClasses'`` optional argument to search all subclasses: .. image:: /img/matnwb_searchForExample-withSubclassing.png .. note:: As seen above, the keys to ``searchFor`` method's returned Map can be paired with the ``resolve`` method to effectively retrieve an object from any NwbFile. This is also true for internal HDF5 paths.