def filename(self, fname, timestep=None, suffix='<STR_LIT>', force_legacy=False):
if timestep is not None:<EOL><INDENT>fname += '<STR_LIT>'.format(timestep)<EOL><DEDENT>fname += suffix<EOL>if not force_legacy and self.hdf5:<EOL><INDENT>fpath = self.hdf5 / fname<EOL><DEDENT>else:<EOL><INDENT>fpath = self.par['<STR_LIT>']['<STR_LIT>'] + '<STR_LIT:_>' + fname<EOL>fpath = self.path / fpath<EOL><DEDENT>return fpath<EOL>
Return name of StagYY output file.

        Args:
            fname (str): name stem.
            timestep (int): snapshot number, set to None if this is not
                relevant.
            suffix (str): optional suffix of file name.
            force_legacy (bool): force returning the legacy output path.
        Returns:
            :class:`pathlib.Path`: the path of the output file constructed
            with the provided segments.