I am using truezip version (7.7.9) to update a archive file. The way I am doing it is as follows
File entry = new TFile(filepath);
writer = new TFileWriter(entry);
writer.append("MyString");
writer.flush();
long fileSize = entry.length(); // which always gives value as 0
I need the exact file size for some purpose But this always gives 0 Is there any other way I can get that.
I read the documentation of TFile class\ https://truezip.java.net/apidocs/de/schlichtherle/truezip/file/TFile.html#length() couldn't quite understand what it does
From the FAQ:
It seems you can either compute the size of the file before changing it and then add the size of what you are appending, or you need to write the file and then call
File.length(). You can do this by calling TVFS.unmount() or TVFS.unmount(TFile)