parameters: (path)
docstring: Ensure that a directory exists (similar to ``mkdir -p``).
  
  	:type  dir: string
  	:param dir: Path to directory
docstring_summary: Ensure that a directory exists (similar to ``mkdir -p``).
docstring_tokens: Ensure that a directory exists ( similar to mkdir - p ) .
function: def check_dir(path):
  	"""
  	Ensure that a directory exists (similar to ``mkdir -p``).
  
  	:type  dir: string
  	:param dir: Path to directory
  	"""
  	if not os.path.isdir(path):
  		try:
  			os.makedirs(path)
  		except OSError as e:
  			if not os.path.isdir(path):
  				raise Errors.WafError('Cannot create the folder %r' % path, ex=e)
function_tokens: def check_dir ( path ) : if not os . path . isdir ( path ) : try : os . makedirs ( path ) except OSError as e : if not os . path . isdir ( path ) : raise Errors . WafError ( 'Cannot create the folder %r' % path , ex = e )