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  |
BetoValle
Messages: 204 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;
}
|
|
|
Goto Forum:
Current Time: Tue Apr 29 00:37:03 CEST 2025
Total time taken to generate the page: 0.00643 seconds
|