public function copy($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);
		}

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

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

			copy($this -> file -> getBasepath(), $directory . $this -> file -> getBasename());
		}

		return $this;
	}
public function copy($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);
		}

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

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

			copy($this -> file -> getBasepath(), $directory . $this -> file -> getBasename());
		}

		return $this;
	}
public function copy ( $ 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 ) ; } if ( false !== $ this -> file -> getExists ( ) ) { //Add directory seperator to directory
 $ directory = rtrim ( $ directory , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR ; copy ( $ this -> file -> getBasepath ( ) , $ directory . $ this -> file -> getBasename ( ) ) ; } return $ this ; }
Makes a copy of the file to the destination directory
@param string $directory
@return sFire\System\File
Makes a copy of the file to the destination directory