public function wd($dir = null, $code = E_USER_WARNING){
		if(null !== $dir && is_dir($dir)){
			$this->wd = $dir;
			if(chdir($dir) === false){
			    throw new \Exception('Cannot change to directory '.$dir.' in '.__METHOD__, $code);
				return $this;
			}
		}else{
			$dir = $this->wd;
		}
		return $this;
	}
public function wd($dir = null, $code = E_USER_WARNING){
		if(null !== $dir && is_dir($dir)){
			$this->wd = $dir;
			if(chdir($dir) === false){
			    throw new \Exception('Cannot change to directory '.$dir.' in '.__METHOD__, $code);
				return $this;
			}
		}else{
			$dir = $this->wd;
		}
		return $this;
	}
public function wd ( $ dir = null , $ code = E_USER_WARNING ) { if ( null !== $ dir && is_dir ( $ dir ) ) { $ this -> wd = $ dir ; if ( chdir ( $ dir ) === false ) { throw new \ Exception ( 'Cannot change to directory ' . $ dir . ' in ' . __METHOD__ , $ code ) ; return $ this ; } } else { $ dir = $ this -> wd ; } return $ this ; }
set working directory
set working directory