Bug 20222 - [PATCH] TypeSelector for choosing directories/regular files
Summary: [PATCH] TypeSelector for choosing directories/regular files
Status: CLOSED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: nightly
Hardware: Other other
: P3 enhancement (vote)
Target Milestone: 1.6
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-25 04:50 UTC by Jeff Turner
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments
Patch implementing and documenting TypeSelector (10.54 KB, patch)
2003-05-25 04:51 UTC, Jeff Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Turner 2003-05-25 04:50:26 UTC
Hi,

Attached is a patch implementing a <type> Selector, which lets one select only
directories:

<filetype src="${src}">
  <type type="dir"/>
</filetype>

Or only regular files, with <type type="file"/>

I found this useful in conjunction with the <different> selector, which regards
directories as always different. Possibly this is a separate bug, but I thought
a generic 'type' selector would be a useful addition anyway.

The idea of a 'type' selector could easily be extended further to include:
 - is file readable
 - is file writeable
 - file exists
 - file is hidden

Feedback on whether/how to do this appreciated.

Thanks,

--Jeff
Comment 1 Jeff Turner 2003-05-25 04:51:28 UTC
Created attachment 6482 [details]
Patch implementing and documenting TypeSelector
Comment 2 Antoine Levy-Lambert 2003-05-25 11:07:45 UTC
I am working on your contribution, creating a testcase for it.
Comment 3 Antoine Levy-Lambert 2003-05-25 11:45:15 UTC
patches submitted, thanks.
Comment 4 Jeff Turner 2003-05-25 12:32:49 UTC
Looks fine. Thanks for applying

--Jeff