Delete a file from the file system.

last_error is updated to contains the error information on error, and null on success.

Property definitions

core $ Path :: delete
	# Delete a file from the file system.
	#
	# `last_error` is updated to contains the error information on error, and null on success.
	fun delete
	do
		var res = path.to_cstring.file_delete
		if not res then
			last_error = new IOError("Cannot delete `{path}`: {sys.errno.strerror}")
		else
			last_error = null
		end
	end
lib/core/file.nit:492,2--503,4