get_latest_file

stsynphot.stio.get_latest_file(template, raise_error=False, err_msg='')[source]

Find the filename that appears last in sorted order based on given template.

Parameters
templatestr

Search template in the form of path/pattern where pattern is acceptable by fnmatch.

raise_errorbool, optional

Raise an error when no files found. Otherwise, will issue warning only.

err_msgstr

Alternate message for when no files found. If not given, generic message is used.

Returns
filenamestr

Latest filename.

Raises
IOError

No files found.