src/FS/File/Arc/Zip.php
public function extract( $targetPath = NULL )
	{
		$counter	= 0;
		if( $targetPath )
		{
			$cwd	= getCwd();
			Folder_Editor::createFolder( $targetPath );
			chdir( $targetPath );
		}
		foreach( $this->folders as $folder )
			Folder_Editor::createFolder( $folder['name'] );
		foreach( $this->files as $file )
		{
			if( $folder = dirname( $file['name'] ) )
				Folder_Editor::createFolder( $folder );
			$counter	+= (int)(bool) File_Writer::save( $file['name'], $file['file'] );
		}
		if( $targetPath )
			chDir( $cwd );
		return $counter;
	}
public function extract( $targetPath = NULL )
	{
		$counter	= 0;
		if( $targetPath )
		{
			$cwd	= getCwd();
			Folder_Editor::createFolder( $targetPath );
			chdir( $targetPath );
		}
		foreach( $this->folders as $folder )
			Folder_Editor::createFolder( $folder['name'] );
		foreach( $this->files as $file )
		{
			if( $folder = dirname( $file['name'] ) )
				Folder_Editor::createFolder( $folder );
			$counter	+= (int)(bool) File_Writer::save( $file['name'], $file['file'] );
		}
		if( $targetPath )
			chDir( $cwd );
		return $counter;
	}
public function extract ( $ targetPath = NULL ) { $ counter = 0 ; if ( $ targetPath ) { $ cwd = getCwd ( ) ; Folder_Editor :: createFolder ( $ targetPath ) ; chdir ( $ targetPath ) ; } foreach ( $ this -> folders as $ folder ) Folder_Editor :: createFolder ( $ folder [ 'name' ] ) ; foreach ( $ this -> files as $ file ) { if ( $ folder = dirname ( $ file [ 'name' ] ) ) Folder_Editor :: createFolder ( $ folder ) ; $ counter += ( int ) ( bool ) File_Writer :: save ( $ file [ 'name' ] , $ file [ 'file' ] ) ; } if ( $ targetPath ) chDir ( $ cwd ) ; return $ counter ; }
Extracts all Folders and Files to a Path and returns Number of extracted Files.
@access		public
@param		string		$targetPath			Path to extract to
@return		int			Number of extracted Files
Extracts all Folders and Files to a Path and returns Number of extracted Files .