Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Callbacks and Timers » how to do to stop progress zip file ?
how to do to stop progress zip file ? [message #57076] Fri, 21 May 2021 01:59 Go to previous message
BetoValle is currently offline  BetoValle
Messages: 203
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member

HI,

when i produce the code, how to do to stop progress writing zip file ?

Thanks!


#include <plugin/zip/zip.h>
using namespace Upp;

Gate2<int, int> WhenProgress; //tipo definido
int fx(int a,int b){
  float f= static_cast<double>(a) / b * 100;
  Cout() <<"avaliando " << a << " " << b << " % " << Format("%.1f%%", f ) << EOL;
  return WhenProgress(a,b); 
}
  		
CONSOLE_APP_MAIN   
{
        FileZip zip("c:\\tempFolder\\compress.zip");  
	FindFile fff("C:\\Users\\myFolder\\Videos\\file.mp4");
	while(fff) {
	       if(fff.IsFile()) {
                   String s=fff.GetPath();//+fff.GetName();
                   Cout()<< "indo/going " << s << EOL;				
		   zip.WriteFile(LoadFile(s), fff.GetName(),fx); 
			}
		fff.Next();
	}
	zip.Finish();

   Cout() << "ended!" << EOL;
   
}

 
Read Message
Read Message
Read Message
Previous Topic: Setting a timer to call Ctrl::Refresh in Ctrl::Paint()
Next Topic: TimerCallBack interval resolution
Goto Forum:
  


Current Time: Mon Apr 29 09:17:37 CEST 2024

Total time taken to generate the page: 0.03528 seconds