public function dir()
	{
		$dir = clone $this;
		if ($this->lastPart === '') {
			// already dir
		} else if ($this->lastPart === '..' || $this->lastPart === '.') {
			$dir->parts[] = '';
		} else {
			array_pop($dir->parts);
			$dir->parts[] = '';
		}
		$dir->setParts($dir->parts);
		return $dir;
	}
public function dir()
	{
		$dir = clone $this;
		if ($this->lastPart === '') {
			// already dir
		} else if ($this->lastPart === '..' || $this->lastPart === '.') {
			$dir->parts[] = '';
		} else {
			array_pop($dir->parts);
			$dir->parts[] = '';
		}
		$dir->setParts($dir->parts);
		return $dir;
	}
public function dir ( ) { $ dir = clone $ this ; if ( $ this -> lastPart === '' ) { // already dir } else if ( $ this -> lastPart === '..' || $ this -> lastPart === '.' ) { $ dir -> parts [ ] = '' ; } else { array_pop ( $ dir -> parts ) ; $ dir -> parts [ ] = '' ; } $ dir -> setParts ( $ dir -> parts ) ; return $ dir ; }
Returns a new path object that points to the dirname part.

@return static a new Path object
Returns a new path object that points to the dirname part .