Sizes of Files and Zipfiles, etc
Posted on 2006-05-16
I am working on an application that, for part of it, a zip file is created. Where the zipfile is placed depends on its size (i.e. if it causes the current directory to hit capacity or not).
In doing a little poking around, this is what I have found:
- In order to determine the size a zip file will be that holds a given set of files, I actually need to construct it.
- A File object is immutable, so once it is created, I cannot make it 'point' to another directory/filepath.
Based on this, the only thing I can figure is that if the zip file is too large, I will actually need to repeat the process of creating it in order to put it in a secondary directory if the first hits capacity.
I would like to know if others agree with this or if there is another reasonable way to handle this.