def METHOD_NAME(self, filename):
    """Register a file with the data library.
    Parameters
    ----------
    filename : str or Path
        Path to the file to be registered.
        If an ``xml`` file, treat as the depletion chain file without
        materials.
    """
    if not isinstance(filename, pathlib.Path):
        path = pathlib.Path(filename)
    else:
        path = filename
    if path.suffix == '.xml':
        filetype = 'depletion_chain'
        materials = []
    elif path.suffix == '.h5':
        with h5py.File(path, 'r') as h5file:
            filetype = h5file.attrs['filetype'].decode()[5:]
            materials = list(h5file)
    else:
        raise ValueError(
            "File type {} not supported by {}"
            .format(path.name, self.__class__.__name__))
    library = {'path': str(path), 'type': filetype, 'materials': materials}
    self.append(library)