Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 44122 invoked from network); 6 Dec 2002 14:03:15 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 6 Dec 2002 14:03:15 -0000 Received: (qmail 453 invoked by uid 97); 6 Dec 2002 14:04:16 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 353 invoked by uid 97); 6 Dec 2002 14:04:12 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 326 invoked by uid 97); 6 Dec 2002 14:04:10 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: 6 Dec 2002 14:02:01 -0000 Message-ID: <20021206140201.5910.qmail@icarus.apache.org> From: bodewig@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types ZipFileSet.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bodewig 2002/12/06 06:02:01 Modified: src/main/org/apache/tools/ant/types ZipFileSet.java Log: Some prelimnary commit for bug 6492 - I'm still trying to understand how Info-Zip stores the permissions Revision Changes Path 1.12 +53 -2 jakarta-ant/src/main/org/apache/tools/ant/types/ZipFileSet.java Index: ZipFileSet.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/ZipFileSet.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ZipFileSet.java 25 Jul 2002 15:21:21 -0000 1.11 +++ ZipFileSet.java 6 Dec 2002 14:02:01 -0000 1.12 @@ -58,6 +58,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Project; +import org.apache.tools.zip.UnixStat; /** * A ZipFileSet is a FileSet with extra attributes useful in the context of @@ -83,13 +84,25 @@ private String prefix = ""; private String fullpath = ""; private boolean hasDir = false; + private int fileMode = UnixStat.FILE_FLAG | UnixStat.DEFAULT_FILE_PERM; + private int dirMode = UnixStat.DIR_FLAG | UnixStat.DEFAULT_DIR_PERM; public ZipFileSet() { - super(); + super(); } protected ZipFileSet(FileSet fileset) { - super(fileset); + super(fileset); + } + + protected ZipFileSet(ZipFileSet fileset) { + super(fileset); + srcFile = fileset.srcFile; + prefix = fileset.prefix; + fullpath = fileset.fullpath; + hasDir = fileset.hasDir; + fileMode = fileset.fileMode; + dirMode = fileset.dirMode; } /** @@ -180,6 +193,44 @@ } else { return super.getDirectoryScanner(p); } + } + + /** + * A 3 digit octal string, specify the user, group and + * other modes in the standard Unix fashion; + * optional, default=0644 + * + * @since Ant 1.6 + */ + public void setFileMode(String octalString) { + this.fileMode = + UnixStat.FILE_FLAG | Integer.parseInt(octalString, 8); + } + + /** + * @since Ant 1.6 + */ + public int getFileMode() { + return fileMode; + } + + /** + * A 3 digit octal string, specify the user, group and + * other modes in the standard Unix fashion; + * optional, default=0755 + * + * @since Ant 1.6 + */ + public void setDirMode(String octalString) { + this.dirMode = + UnixStat.DIR_FLAG | Integer.parseInt(octalString, 8); + } + + /** + * @since Ant 1.6 + */ + public int getDirMode() { + return dirMode; } /** -- To unsubscribe, e-mail: For additional commands, e-mail: