def output_path(self, filename, directory=False, cached=False): """ Adds output path, if directory is true a directory will will be created automatically. :param str filename: :param bool directory: :param bool cached: :rtype: Path """ path = Path(filename, self, cached) assert path.get_path() not in self._sis_outputs self._sis_outputs[path.get_path()] = path if directory: self._sis_output_dirs.add(path) return path
def output_path(self, filename, directory=False, cached=False): """ Adds output path, if directory is true a directory will will be created automatically. :param str filename: :param bool directory: :param bool cached: :rtype: Path """ path = Path(filename, self, cached) if path.get_path() in self._sis_outputs: logging.warning('Added output %s more than once to %s' % (filename, self)) return self._sis_outputs[path.get_path()] self._sis_outputs[path.get_path()] = path if directory: self._sis_output_dirs.add(path) return path