public function copyTo($strNewName)
	{
		$strParent = \dirname($strNewName);

		// Create the parent folder if it does not exist
		if (!is_dir($this->strRootDir . '/' . $strParent))
		{
			new self($strParent);
		}

		$this->Files->rcopy($this->strFolder, $strNewName);

		// Update the database AFTER the folder has been renamed
		$syncSource = Dbafs::shouldBeSynchronized($this->strFolder);
		$syncTarget = Dbafs::shouldBeSynchronized($strNewName);

		if ($syncSource && $syncTarget)
		{
			Dbafs::copyResource($this->strFolder, $strNewName);
		}
		elseif ($syncTarget)
		{
			Dbafs::addResource($strNewName);
		}

		return true;
	}
public function copyTo($strNewName)
	{
		$strParent = \dirname($strNewName);

		
		if (!is_dir($this->strRootDir . '/' . $strParent))
		{
			new self($strParent);
		}

		$this->Files->rcopy($this->strFolder, $strNewName);

		
		$syncSource = Dbafs::shouldBeSynchronized($this->strFolder);
		$syncTarget = Dbafs::shouldBeSynchronized($strNewName);

		if ($syncSource && $syncTarget)
		{
			Dbafs::copyResource($this->strFolder, $strNewName);
		}
		elseif ($syncTarget)
		{
			Dbafs::addResource($strNewName);
		}

		return true;
	}
public function copyTo ( $ strNewName ) { $ strParent = \ dirname ( $ strNewName ) ; // Create the parent folder if it does not exist if ( ! is_dir ( $ this -> strRootDir . '/' . $ strParent ) ) { new self ( $ strParent ) ; } $ this -> Files -> rcopy ( $ this -> strFolder , $ strNewName ) ; // Update the database AFTER the folder has been renamed $ syncSource = Dbafs :: shouldBeSynchronized ( $ this -> strFolder ) ; $ syncTarget = Dbafs :: shouldBeSynchronized ( $ strNewName ) ; if ( $ syncSource && $ syncTarget ) { Dbafs :: copyResource ( $ this -> strFolder , $ strNewName ) ; } elseif ( $ syncTarget ) { Dbafs :: addResource ( $ strNewName ) ; } return true ; }
Copy the folder

@param string $strNewName The target path

@return boolean True if the operation was successful
Copy the folder