def directory_get_basename(path: str) -> str:
	"""Returns the last directory in a path."""
	p = path
	if p.endswith('/'):
		p = p[:-1]
	elif '.' in p:
		p = p[:p.rfind('/')]
	return p[p.rfind('/') + 1:]