Retrieves the name of the given path.
the name of the provided path as a String.
the Path object from which the name will be extracted.