From 0ff79ca296de72581e933303fec7d4c2bfe967c2 Mon Sep 17 00:00:00 2001 From: Jan Materne Date: Thu, 22 Mar 2007 08:07:38 +0000 Subject: [PATCH] Add examples for . Got it from testcase and user-list (Matt). git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@521145 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTypes/resources.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/manual/CoreTypes/resources.html b/docs/manual/CoreTypes/resources.html index 04b974041..662d13cc8 100644 --- a/docs/manual/CoreTypes/resources.html +++ b/docs/manual/CoreTypes/resources.html @@ -742,6 +742,30 @@ platforms.

reverse

Reverse the natural sort order, or that of a single nested comparator.

+

Examples

+
+    <property name="eol" value="${line.separator}" />
+    <pathconvert property="sorted" pathsep="${eol}">
+      <sort>
+        <tokens>
+          <string value="foo bar etc baz" />
+          <stringtokenizer />
+        </tokens>
+      </sort>
+    </pathconvert>
+

The resource of type string "foo bar etc baz" is split into four tokens by + the stringtokenizer. These tokens are sorted and there sorted gets the value + of "bar baz etc foo".

+ +
+    <sort>
+      <fileset dir="foo" />
+      <reverse>
+        <date />
+      </reverse>
+    </sort>
+

This takes all files from foo and sorts it by modification date in reverse order.

+

first