lib/private/Archive/TAR.php
/**
	 * add an empty folder to the archive
	 *
	 * @param string $path
	 * @return bool
	 */
add an empty folder to the archive
@param string $path
@return bool
add an empty folder to the archive @param string $path @return bool
function addFolder($path) {
		$tmpBase = \OC::$server->getTempManager()->getTemporaryFolder();
		if (substr($path, -1, 1) != '/') {
			$path .= '/';
		}
		if ($this->fileExists($path)) {
			return false;
		}
		$parts = explode('/', $path);
		$folder = $tmpBase;
		foreach ($parts as $part) {
			$folder .= '/' . $part;
			if (!is_dir($folder)) {
				mkdir($folder);
			}
		}
		$result = $this->tar->addModify(array($tmpBase . $path), '', $tmpBase);
		rmdir($tmpBase . $path);
		$this->fileList = false;
		$this->cachedHeaders = false;
		return $result;
	}
function addFolder ( $ path ) { $ tmpBase = \ OC :: $ server -> getTempManager ( ) -> getTemporaryFolder ( ) ; if ( substr ( $ path , - 1 , 1 ) != '/' ) { $ path .= '/' ; } if ( $ this -> fileExists ( $ path ) ) { return false ; } $ parts = explode ( '/' , $ path ) ; $ folder = $ tmpBase ; foreach ( $ parts as $ part ) { $ folder .= '/' . $ part ; if ( ! is_dir ( $ folder ) ) { mkdir ( $ folder ) ; } } $ result = $ this -> tar -> addModify ( array ( $ tmpBase . $ path ) , '' , $ tmpBase ) ; rmdir ( $ tmpBase . $ path ) ; $ this -> fileList = false ; $ this -> cachedHeaders = false ; return $ result ; }
add an empty folder to the archive
 @param string $path
 @return bool
add an empty folder to the archive @param string $path @return bool