blades/owncloud_core/lib/private/archive/tar.php
/**
	 * add a file to the archive
	 *
	 * @param string $path
	 * @param string $source either a local file or string data
	 * @return bool
	 */
add a file to the archive
@param string $path
@param string $source either a local file or string data
@return bool
add a file to the archive @param string $path @param string $source either a local file or string data @return bool
function addFile($path, $source = '') {
		if ($this->fileExists($path)) {
			$this->remove($path);
		}
		if ($source and $source[0] == '/' and file_exists($source)) {
			$source = file_get_contents($source);
		}
		$result = $this->tar->addString($path, $source);
		$this->fileList = false;
		$this->cachedHeaders = false;
		return $result;
	}
function addFile ( $ path , $ source = '' ) { if ( $ this -> fileExists ( $ path ) ) { $ this -> remove ( $ path ) ; } if ( $ source and $ source [ 0 ] == '/' and file_exists ( $ source ) ) { $ source = file_get_contents ( $ source ) ; } $ result = $ this -> tar -> addString ( $ path , $ source ) ; $ this -> fileList = false ; $ this -> cachedHeaders = false ; return $ result ; }
add a file to the archive
 @param string $path
 @param string $source either a local file or string data
 @return bool
add a file to the archive @param string $path @param string $source either a local file or string data @return bool