I had a similar request in this email list. Here is a link: http://www.nabble.com/zip-tar-and-file-permissions-td22315686.html
It has some feedback on this subject. --- Shawn Castrianni -----Original Message----- From: Francis GALIEGUE [mailto:f...@one2team.com] Sent: Friday, October 23, 2009 3:01 PM To: Ant Users List Subject: Checking whether a file is executable Hello, Ant's <available> condition can check whether a file exists and is a regular file (with type="file"), but I have seen no condition that can tell me whether a given regular file is executable (sorry for the Unix speak - FWIW, a regular file is just that, a file - a directory is just another type of file). Java has .canExecute() which can tell whether a given File object is executable. Where should I start to look if I want to create, say, a <isexecutabe> condition? Or is there something existing that I just overlooked? I could use <exec> and work out the return value, but I'd be better off if I could fail earlier, finding that a given file is just not executable at all... -- Francis Galiegue ONE2TEAM Ingénieur système Mob : +33 (0) 683 877 875 Tel : +33 (0) 178 945 552 f...@one2team.com 40 avenue Raymond Poincaré 75116 Paris --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org ---------------------------------------------------------------------- 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.