-----Original Message-----
From: Francis GALIEGUE [mailto:f...@one2team.com]
Sent: Friday, October 23, 2009 10: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...
*/
another possibility would be to check, whether the file is binary, see =
http://marc.info/?l=ant-user&m=118769231408319&w=2
Regards, Gilbert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org