public function rename($name) {

		if(false === is_string($name)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($name)), E_USER_ERROR);
		}

		if(false !== $this -> directory -> getExists()) {
			
			if(rename($this -> directory -> getPath(), $this -> directory -> getBasepath() . $name)) {

				$this -> directory -> setName($name);
				$this -> directory -> setPath($this -> directory -> getBasepath() . $name);
			}
		}

		return $this;
	}
public function rename($name) {

		if(false === is_string($name)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($name)), E_USER_ERROR);
		}

		if(false !== $this -> directory -> getExists()) {
			
			if(rename($this -> directory -> getPath(), $this -> directory -> getBasepath() . $name)) {

				$this -> directory -> setName($name);
				$this -> directory -> setPath($this -> directory -> getBasepath() . $name);
			}
		}

		return $this;
	}
public function rename ( $ name ) { if ( false === is_string ( $ name ) ) { return trigger_error ( sprintf ( 'Argument 1 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ name ) ) , E_USER_ERROR ) ; } if ( false !== $ this -> directory -> getExists ( ) ) { if ( rename ( $ this -> directory -> getPath ( ) , $ this -> directory -> getBasepath ( ) . $ name ) ) { $ this -> directory -> setName ( $ name ) ; $ this -> directory -> setPath ( $ this -> directory -> getBasepath ( ) . $ name ) ; } } return $ this ; }
Rename the current directory
@param string $name
@return sFire\System\Directory
Rename the current directory