Java 1.6 seems to have available: canRead canWrite canExecute (new to 1.6) setReadable (new to 1.6) setWritable (new to 1.6) setExecutable (new to 1.6)
which makes me think this is now possible to do in a platform independent way from ANT. --- Shawn Castrianni From: Shawn Castrianni Sent: Tuesday, March 03, 2009 1:14 PM To: 'Ant Users List' Subject: zip/tar and file permissions I am trying to zip or tar up some files in a platform independent way but retain file permissions if on unix. I thought I found the answer when I saw that both zipfileset and tarfileset support the filemode attribute. However, I quickly discovered that this allows the file permissions to be set to some hardcoded value for all files. I want whatever the file permissions are on the filesystem to be retained in the zip or tar so I can't hardcode them all to one value. Each file may be different. It would seem that a better default for filemode would be "retain" and not "644". Is it possible to do what I want without resorting to the exec task and just executing tar directly and then hoping that any windows machine has MKS toolkit installed so that tar exists? --- Shawn Castrianni ---------------------------------------------------------------------- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.