Is self the path to an existing directory ?

assert ".".to_path.is_dir
assert not "/etc/issue".to_path.is_dir
assert not "/should/not/exist".to_path.is_dir

Property definitions

core $ Path :: is_dir
	# Is `self` the path to an existing directory ?
	#
	# ~~~nit
	# assert ".".to_path.is_dir
	# assert not "/etc/issue".to_path.is_dir
	# assert not "/should/not/exist".to_path.is_dir
	# ~~~
	fun is_dir: Bool do
		var st = stat
		if st == null then return false
		return st.is_dir
	end
lib/core/file.nit:697,2--708,4