valpas.utils.checker.check_outfile#
- valpas.utils.checker.check_outfile(path)#
Checks whether the outfile passed to the function satisfies certain criteria. Returns the absolute path to the file. Can be used in conjuction with the
typeparamater inargparse.ArgumentParser.add_argument.- Parameters:
path (str | PathLike | Path) – A path like object that contains the file path that should be checked for compliance.
- Returns:
Returns the absolute Path to the file if the file is compliant.
- Return type:
str
- Raises:
TypeError – If the passed
pathargument is not in a path like formatValueError – If the supplied file is not a defined type (in this case .csv or .xlsx).