⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dir.jsp

📁 resinweb服务器源文件
💻 JSP
字号:
<%@ page language=javascript %><html><!-- dir.jsp  -- Creates a page recursively listing all subdirectories and files.  --><head><title>Directory Listing</title></head><body bgcolor=#ffffff><h1>Directory Listing</h1><%//// Resin file I/O roughly follows java.io with the exceptions://   1) All filenames are urls using '/' as the filename separator.//   2) The myriad stream classes, readers, and writers are coalesced //      into a single stream object.//// This function recursively lists the directory contents.// // Example://// top// <ul>// <li>sub1// <li>sub2// <ul>// <li>subsub// </ul>// </ul>//function readdir(path){  out.writeln(path.path.split('/').reverse()[0]);  if (path.isDirectory()) {    out.writeln("<ul>");    for (file in path.list()) {      out.write("<li>");      readdir(path(file));    }    out.writeln("</ul>");  }}readdir(File("data"));%></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -