src/Tasks/Build/Base.php
protected function copyTarget($path, $tar)
	{
		$map = array();
		$hdl = opendir($path);

		while ($entry = readdir($hdl))
		{
			$p = $path . "/" . $entry;

			// Ignore hidden files
			if (substr($entry, 0, 1) != '.')
			{
				if (isset($this->getJConfig()->exclude)
					&& in_array($entry, explode(',', $this->getJConfig()->exclude)))
				{
					continue;
				}

				if (is_file($p))
				{
					$map[] = array("file" => $entry);
					$this->_copy($p, $tar . "/" . $entry);
				}
				else
				{
					$map[] = array("folder" => $entry);
					$this->_copyDir($p, $tar . "/" . $entry);
				}
			}
		}

		closedir($hdl);

		return $map;
	}
protected function copyTarget($path, $tar)
	{
		$map = array();
		$hdl = opendir($path);

		while ($entry = readdir($hdl))
		{
			$p = $path . "/" . $entry;

			// Ignore hidden files
			if (substr($entry, 0, 1) != '.')
			{
				if (isset($this->getJConfig()->exclude)
					&& in_array($entry, explode(',', $this->getJConfig()->exclude)))
				{
					continue;
				}

				if (is_file($p))
				{
					$map[] = array("file" => $entry);
					$this->_copy($p, $tar . "/" . $entry);
				}
				else
				{
					$map[] = array("folder" => $entry);
					$this->_copyDir($p, $tar . "/" . $entry);
				}
			}
		}

		closedir($hdl);

		return $map;
	}
protected function copyTarget ( $ path , $ tar ) { $ map = array ( ) ; $ hdl = opendir ( $ path ) ; while ( $ entry = readdir ( $ hdl ) ) { $ p = $ path . "/" . $ entry ; // Ignore hidden files if ( substr ( $ entry , 0 , 1 ) != '.' ) { if ( isset ( $ this -> getJConfig ( ) -> exclude ) && in_array ( $ entry , explode ( ',' , $ this -> getJConfig ( ) -> exclude ) ) ) { continue ; } if ( is_file ( $ p ) ) { $ map [ ] = array ( "file" => $ entry ) ; $ this -> _copy ( $ p , $ tar . "/" . $ entry ) ; } else { $ map [ ] = array ( "folder" => $ entry ) ; $ this -> _copyDir ( $ p , $ tar . "/" . $ entry ) ; } } } closedir ( $ hdl ) ; return $ map ; }
Copies the files and maps them into an array

@param   string $path - Folder path
@param   string $tar  - Target path

@return  array

@since   1.0
Copies the files and maps them into an array