@@ -0,0 +1,1078 @@
+package lucee.runtime.util;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.IOException;%0A%0Aimport lucee.print;%0Aimport lucee.commons.io.IOUtil;%0A%0Apublic class FileList %7B%0A%0A%09private static int count = 0;%0A%0A%09public static void list(File file) throws IOException %7B%0A%09%09if (file.isFile()) %7B%0A%09%09%09if (file.toString().endsWith(%22.cfm%22) %7C%7C file.toString().endsWith(%22.cfc%22)) %7B%0A%09%09%09%09FileInputStream fis = new FileInputStream(file);%0A%09%09%09%09try %7B%0A%09%09%09%09%09String str = IOUtil.toString(fis, %22UTF-8%22);%0A%09%09%09%09%09//%0A%09%09%09%09%09// if (str.indexOf(%22%5C%22upload%5C%22%22) != -1) print.e(file);%0A%09%09%09%09%09// else if (str.indexOf(%22'upload'%22) != -1) print.e(file);%0A%09%09%09%09%09if (str.indexOf(%22%5C%22upload%5C%22%22) != -1) print.e((++count) + %22 %22 + file);%0A%09%09%09%09%7D%0A%09%09%09%09finally %7B%0A%09%09%09%09%09IOUtil.closeEL(fis);%0A%09%09%09%09%7D%0A%0A%09%09%09%7D%0A%0A%09%09%7D%0A%09%09else if (file.isDirectory()) %7B%0A%09%09%09File%5B%5D children = file.listFiles();%0A%09%09%09if (children != null) for (File child: children) %7B%0A%09%09%09%09list(child);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%0A%09public static void main(String%5B%5D args) throws Exception %7B%0A%09%09String path = %22/Users/mic/Projects/Distrokid/distrokid%22;%0A%09%09File f = new File(path);%0A%09%09list(f);%0A%09%7D%0A%7D%0A

add file list test