public function move($directory) {

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

		if(false === is_dir($directory)) {
			return trigger_error(sprintf('Directory "%s" passed to %s is not an existing directory', $directory, __METHOD__), E_USER_ERROR);
		}

		if(false === is_writable($directory)) {
			return trigger_error(sprintf('Directory "%s" passed to %s is not writable', $directory, __METHOD__), E_USER_ERROR);
		}

		//Add directory seperator to directory
		$directory = rtrim($directory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;

		if(false !== $this -> directory -> getExists()) {

			if(rename($this -> directory -> getPath(), $directory . $this -> directory -> getName())) {

				$this -> directory -> setPath($directory);
				$this -> directory -> setBasepath($directory . $this -> directory -> getName());
			}
		}

		return $this;
	}
public function move($directory) {

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

		if(false === is_dir($directory)) {
			return trigger_error(sprintf('Directory "%s" passed to %s is not an existing directory', $directory, __METHOD__), E_USER_ERROR);
		}

		if(false === is_writable($directory)) {
			return trigger_error(sprintf('Directory "%s" passed to %s is not writable', $directory, __METHOD__), E_USER_ERROR);
		}

		//Add directory seperator to directory
		$directory = rtrim($directory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;

		if(false !== $this -> directory -> getExists()) {

			if(rename($this -> directory -> getPath(), $directory . $this -> directory -> getName())) {

				$this -> directory -> setPath($directory);
				$this -> directory -> setBasepath($directory . $this -> directory -> getName());
			}
		}

		return $this;
	}
public function move ( $ directory ) { if ( false === is_string ( $ directory ) ) { return trigger_error ( sprintf ( 'Argument 1 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ directory ) ) , E_USER_ERROR ) ; } if ( false === is_dir ( $ directory ) ) { return trigger_error ( sprintf ( 'Directory "%s" passed to %s is not an existing directory' , $ directory , __METHOD__ ) , E_USER_ERROR ) ; } if ( false === is_writable ( $ directory ) ) { return trigger_error ( sprintf ( 'Directory "%s" passed to %s is not writable' , $ directory , __METHOD__ ) , E_USER_ERROR ) ; } //Add directory seperator to directory
 $ directory = rtrim ( $ directory , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR ; if ( false !== $ this -> directory -> getExists ( ) ) { if ( rename ( $ this -> directory -> getPath ( ) , $ directory . $ this -> directory -> getName ( ) ) ) { $ this -> directory -> setPath ( $ directory ) ; $ this -> directory -> setBasepath ( $ directory . $ this -> directory -> getName ( ) ) ; } } return $ this ; }
Move the current directory to a new directory including its content
@param string $directory
@return sFire\System\Directory
Move the current directory to a new directory including its content