import org.apache.jackrabbit.webdav.DavResource;
import org.apache.jackrabbit.webdav.io.OutputContext;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.Date;
+import java.util.List;
import java.io.PrintWriter;
import java.io.File;
private void writeHyperlinks(PrintWriter writer)
{
- for (File file : localResource.listFiles())
+ List<File> files = new ArrayList<File>( Arrays.asList( localResource.listFiles() ) );
+ Collections.sort( files );
+
+ for ( File file : files )
{
writeHyperlink(writer, file.getName(), file.isDirectory());
}