Summary: | enhance <available> to test for owner, group and permissions - security feature | ||
---|---|---|---|
Product: | Ant | Reporter: | Ralf Hauser <hauser> |
Component: | Core tasks | Assignee: | Ant Notifications List <notifications> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P3 | ||
Version: | 1.5.3 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Ralf Hauser
2003-08-13 05:53:10 UTC
Since most of these properties are operating system specific, it would not be feasible to implement this in Java without some sort of external support. I'd prefer not to do that in <available> Since this is OS specific, why not do something using an OS specific script? isn't your argument about scripts not the best reason to do it in ant: Otherwise, everybody all over the world - with or without adequate scripting skills - is forced to piece together a hand-knit kind-of-working script. If it is done here - i) people can remain in the world they are familiar with (Java/Ant), ii) it undergoes due community review, and iii) since Java is aware of the os and arch, delicate intricacies can be caught while one might otherwise copy an inadequate example script from a ill-specified google search? Well, how exactly are we going to do this in java? How to do this in Java - (not being a Java expert), it appears that the neccesary classes do exist as per http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22405 . For the complement to this passive/get approach - see the suggestion for the "set" approach in http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22417 . What Steve tried to say - there is no way to do what you want without either (1) using native code or (2) parse the output of an external executable like "ls -l" The later is not without precedent as we do something similar to access environment variables. well, to be precise, I was implying without third party native code. I am sure that java.io goes native at some point, it merely does so without providing any access to any permission bits other than "readonly". ownedby selector is available in Ant 1.10; posixGroup and posixPermissions selectors are ready for 1.10.4 release; non-POSIX filesystems (currently) lack support in Java NIO. |