Adding Files And Directories
There are 2 ways to add files and directories: use the File/Add Files…
menu option or simply drag and drop files and directories onto JZip. Files
are always added with their full pathname (but without any leading slash).
Optionally files can be added without any directory information – this
mode is selected from the Preferences Dialog (Exclude
full path when adding files). Note: the script processing facility
allows much more flexibility when naming files on the archive.
If you drop a .zip or .jar.ear.war
file onto JZip it will open that file and display its contents. If, however,
you are already displaying an archive and have modified it, JZip will assume
that you want to add the file to the current archive rather than open it
and loose any unsaved changes.
Note:
drag&drop may not work in all environments, it depends upon the JDKs
support for the particular drag&drop protocol in operation within the
environment.
When
file are added to an archive, the archive is not actually updated until
you take the save option. For this reason, the compressed size (ZSize)
of newly added files is always shown as (n/a).
Replacing files on an existing archive
If
you open an existing archive you can add more files to it or replace existing
files by adding files as described above. Files that are added will be
shown with a slightly different icon and a ZSize of (n/a). Note:
you will have to take the File/Save and File/Close
option to actualy update the archive on disk. This operation is dealt with
in more detail in the 'Modifying' help section.