Last change
on this file since 33053 was 33053, checked in by ak19, 5 years ago |
I still had some stuff of Nathan Kelly's (FileTransfer-WebSocketPair) sitting on my USB. Had already commited the Themes folder at the time, 2 years back. Not sure if he wanted this additional folder commited. But I didn't want to delete it and decided it will be better off on SVN. When we use his project, if we find we didn't need this test folder, we can remove it from svn then.
|
File size:
698 bytes
|
Line | |
---|
1 | package org.greenstone.gatherer.remote;
|
---|
2 |
|
---|
3 | import java.io.File;
|
---|
4 | import java.util.ArrayList;
|
---|
5 |
|
---|
6 |
|
---|
7 | /**
|
---|
8 | */
|
---|
9 | public class ZipFiles
|
---|
10 | {
|
---|
11 | static public void main(String[] args)
|
---|
12 | {
|
---|
13 | if (args.length < 3) {
|
---|
14 | System.err.println("Usage: ZipFiles <zip-file> <base-directory-path> (<files> ...)");
|
---|
15 | return;
|
---|
16 | }
|
---|
17 |
|
---|
18 | String zip_file_path = args[0];
|
---|
19 | String base_directory_path = args[1];
|
---|
20 | ArrayList relative_file_paths_list = new ArrayList();
|
---|
21 | for (int i = 2; i < args.length; i++) {
|
---|
22 | relative_file_paths_list.add(args[i]);
|
---|
23 | }
|
---|
24 |
|
---|
25 | String[] relative_file_paths = (String[]) relative_file_paths_list.toArray(new String[0]);
|
---|
26 | ZipTools.zipFiles(zip_file_path, base_directory_path, relative_file_paths);
|
---|
27 | }
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.