code: def from_dir(cls, ID, path,
                   parser='name',
                   position_mapper=None, pattern='*.fcs', recursive=False,
                   readdata_kwargs={}, readmeta_kwargs={}, ID_kwargs={}, **kwargs):
          
          datafiles = get_files(path, pattern, recursive)
          return cls.from_files(ID, datafiles, parser=parser, position_mapper=position_mapper,
                                readdata_kwargs=readdata_kwargs, readmeta_kwargs=readmeta_kwargs,
                                ID_kwargs=ID_kwargs, **kwargs)
docs: Create a Collection of measurements from data files contained in a directory.
  
          Parameters
          ----------
          {_bases_ID}
          datadir : str
              Path of directory containing the data files.
          pattern : str
              Only files matching the pattern will be used to create measurements.
          recursive : bool
              Recursively look for files matching pattern in subdirectories.
          {_bases_filename_parser}
          {_bases_position_mapper}
          {_bases_ID_kwargs}
          kwargs : dict
              Additional key word arguments to be passed to constructor.