<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"

import="java.io.*, java.lang.*, java.util.*, java.util.regex.*, java.util.StringTokenizer, java.util.Date, java.text.*, java.text.SimpleDateFormat, java.text.ParseException" %><%

System.setProperty ( "user.timezone", "GMT+09:00" ) ;

java.util.Date g_PageStartTime = new java.util.Date ( ) ;


response.setHeader ( "Cache-Control", "no-cache,no-store,must-revalidate" ) ;

response.setHeader ( "Pragma", "no-cache" ) ;

response.setDateHeader ( "Expires", 0 ) ;

response.setCharacterEncoding ( "UTF-8" ) ;

request.setCharacterEncoding ( "UTF-8" ) ;


String RootPath = "/download" ;

String tRootPath = DirectoryBrowser ( RootPath ) ; tRootPath = tRootPath.replace ( RootPath + "/" , "" ) ;

out.print ( tRootPath ) ;

%><%!

public static String DirectoryBrowser ( String RootPath )

{

String File_List = "" ;

RootPath = RootPath.replace ( "\\" , "/" ) ;

File FindDir = new File ( RootPath ) ;


String [ ] FindFile = FindDir.list ( ) ;


for ( int i = 0 ; i < FindFile.length ; i ++ )

{

File tDir = new File ( FindDir + "/" + FindFile [ i ] ) ;


if ( tDir.isDirectory ( ) == true )

{

File_List += DirectoryBrowser ( FindDir + "/" + FindFile [ i ] ) ;

}

else

{

File_List += RootPath + "/" + FindFile [ i ] + "\t|\t" + tDir.length ( ) + "<br>\n" ;

}

}


return File_List ;

}%>