def add_directory(self, directory: PathLike) -> None:
        """
        Adds *.gtb.cp4* tables from a directory. The relevant files are lazily
        opened when the tablebase is actually probed.
        """
        directory = os.path.abspath(directory)
        if not os.path.isdir(directory):
            raise IOError("not a directory: {!r}".format(directory))

        for tbfile in fnmatch.filter(os.listdir(directory), "*.gtb.cp4"):
            self.available_tables[os.path.basename(tbfile).replace(".gtb.cp4", "")] = os.path.join(directory, tbfile)
def add_directory ( self , directory : PathLike ) -> None : directory = os . path . abspath ( directory ) if not os . path . isdir ( directory ) : raise IOError ( "not a directory: {!r}" . format ( directory ) ) for tbfile in fnmatch . filter ( os . listdir ( directory ) , "*.gtb.cp4" ) : self . available_tables [ os . path . basename ( tbfile ) . replace ( ".gtb.cp4" , "" ) ] = os . path . join ( directory , tbfile )
Adds *.gtb.cp4* tables from a directory. The relevant files are lazily
        opened when the tablebase is actually probed.