KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > build > ant > TarFileSet


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM - Initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.build.ant;
12
13 public class TarFileSet extends ZipFileSet {
14
15     /**
16      * @param dir
17      * @param file
18      * @param defaultexcludes
19      * @param includes
20      * @param includesfile
21      * @param excludes
22      * @param excludesfile
23      * @param prefix
24      * @param casesensitive
25      */

26     public TarFileSet(String JavaDoc dir, boolean file, String JavaDoc defaultexcludes, String JavaDoc includes, String JavaDoc includesfile, String JavaDoc excludes, String JavaDoc excludesfile, String JavaDoc prefix, String JavaDoc casesensitive, String JavaDoc permission) {
27         super(dir, file, defaultexcludes, includes, includesfile, excludes, excludesfile, prefix, casesensitive, null);
28     }
29
30     protected void print(AntScript script) {
31         script.printTab();
32         script.print("<tarfileset"); //$NON-NLS-1$
33
if (file)
34             script.printAttribute("file", dir, false); //$NON-NLS-1$
35
else
36             script.printAttribute("dir", dir, false); //$NON-NLS-1$
37
script.printAttribute("defaultexcludes", defaultexcludes, false); //$NON-NLS-1$
38
script.printAttribute("includes", includes, false); //$NON-NLS-1$
39
script.printAttribute("includesfile", includesfile, false); //$NON-NLS-1$
40
script.printAttribute("excludes", excludes, false); //$NON-NLS-1$
41
script.printAttribute("excludesfile", excludesfile, false); //$NON-NLS-1$
42
script.printAttribute("casesensitive", casesensitive, false); //$NON-NLS-1$
43
if (file)
44             script.printAttribute("fullpath", prefix, false); //$NON-NLS-1$
45
else
46             script.printAttribute("prefix", prefix, false); //$NON-NLS-1$
47

48         if (file)
49             script.printAttribute("filemode", permission, false); //$NON-NLS-1$
50
else
51             script.printAttribute("dirmode", permission, false); //$NON-NLS-1$
52

53         script.println("/>"); //$NON-NLS-1$
54
}
55 }
56
Popular Tags