package com.tij.io.file;
import java.io.File;
public class DeleteFolderRecursively {
/**
* use be to delete file
* @param args
*/
public static void main(String[] args) {
String folder = "/Users/GYJ/tomcat";
//deleted folder recursively
recursiveDelete(new File(folder));
}
public static void recursiveDelete(File file) {
if (!file.exists()) {
return ;
} else {
if (file.isDirectory()) {
for (File f : file.listFiles()) {
recursiveDelete(f);
}
}
file.delete();
System.out.println("Deleted file/folder: "+file.getAbsolutePath());
}
}
}
out put=============
Deleted file/folder: C:\Users\GYJ\tomcat\bin\bootstrap.jar
Deleted file/folder: C:\Users\GYJ\tomcat\bin\catalina-tasks.xml
Deleted file/folder: C:\Users\GYJ\tomcat\bin\catalina.bat
Deleted file/folder: C:\Users\GYJ\tomcat\bin\catalina.sh
Deleted file/folder: C:\Users\GYJ\tomcat\bin\commons-daemon-native.tar.gz
Deleted file/folder: C:\Users\GYJ\tomcat\bin\commons-daemon.jar
Deleted file/folder: C:\Users\GYJ\tomcat\bin\configtest.sh
Deleted file/folder: C:\Users\GYJ\tomcat\bin\cpappend.bat
Deleted file/folder: C:\Users\GYJ\tomcat\bin\digest.bat
Deleted file/folder: C:\Users\GYJ\tomcat\bin\digest.sh
Deleted file/folder: C:\Users\GYJ\tomcat\bin\service.bat
Deleted file/folder: C:\Users\GYJ\tomcat\bin\setclasspath.bat
Deleted file/folder: C:\Users\GYJ\tomcat\bin\setclasspath.sh
Deleted file/folder: C:\Users\GYJ\tomcat\bin\shutdown.bat
Deleted file/folder: C:\Users\GYJ\tomcat\bin\shutdown.sh
Deleted file/folder: C:\Users\GYJ\tomcat\bin\startup.bat
Deleted file/folder: C:\Users\GYJ\tomcat\bin\startup.sh
Deleted file/folder: C:\Users\GYJ\tomcat\bin\tcnative-1.dll
Deleted file/folder: C:\Users\GYJ\tomcat\bin\tomcat-juli.jar
Deleted file/folder: C:\Users\GYJ\tomcat\bin\tomcat-native.tar.gz
Deleted file/folder: C:\Users\GYJ\tomcat\bin\tomcat7.exe
Deleted file/folder: C:\Users\GYJ\tomcat\bin\tomcat7w.exe
Deleted file/folder: C:\Users\GYJ\tomcat\bin\tool-wrapper.bat
Deleted file/folder: C:\Users\GYJ\tomcat\bin\tool-wrapper.sh
Deleted file/folder: C:\Users\GYJ\tomcat\bin\version.bat
Deleted file/folder: C:\Users\GYJ\tomcat\bin\version.sh
Deleted file/folder: C:\Users\GYJ\tomcat\bin
Deleted file/folder: C:\Users\GYJ\tomcat\conf\catalina.policy
Deleted file/folder: C:\Users\GYJ\tomcat\conf\catalina.properties
Deleted file/folder: C:\Users\GYJ\tomcat\conf\context.xml
Deleted file/folder: C:\Users\GYJ\tomcat\conf\logging.properties
Deleted file/folder: C:\Users\GYJ\tomcat\conf\server.xml
Deleted file/folder: C:\Users\GYJ\tomcat\conf\tomcat-users.xml
Deleted file/folder: C:\Users\GYJ\tomcat\conf\web.xml
Deleted file/folder: C:\Users\GYJ\tomcat\conf
Deleted file/folder: C:\Users\GYJ\tomcat\lib\annotations-api.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\catalina-ant.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\catalina-ha.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\catalina-tribes.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\catalina.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\ecj-3.6.2.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\el-api.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\jasper-el.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\jasper.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\jsp-api.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\servlet-api.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\tomcat-api.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\tomcat-coyote.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\tomcat-dbcp.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\tomcat-i18n-es.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\tomcat-i18n-fr.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\tomcat-i18n-ja.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib\tomcat-util.jar
Deleted file/folder: C:\Users\GYJ\tomcat\lib
Deleted file/folder: C:\Users\GYJ\tomcat\LICENSE
Deleted file/folder: C:\Users\GYJ\tomcat\logs
Deleted file/folder: C:\Users\GYJ\tomcat\NOTICE
Deleted file/folder: C:\Users\GYJ\tomcat\RELEASE-NOTES
Deleted file/folder: C:\Users\GYJ\tomcat\RUNNING.txt
Deleted file/folder: C:\Users\GYJ\tomcat\temp\safeToDelete.tmp
Deleted file/folder: C:\Users\GYJ\tomcat\temp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\aio.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\api\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\api
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\build.xml.txt
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\deployment.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\installation.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\introduction.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\processes.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\build.xml
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\docs\README.txt
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\docs
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\sample.war
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\src\mypackage\Hello.java
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\src\mypackage
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\src
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\web\hello.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\web\images\tomcat.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\web\images
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\web\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\web\WEB-INF\web.xml
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\web\WEB-INF
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample\web
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\sample
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\source.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev\web.xml.txt
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\appdev
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\apr.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture\overview.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture\requestProcess\requestProcess.pdf
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture\requestProcess\roseModel.mdl
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture\requestProcess
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture\requestProcess.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture\startup\serverStartup.pdf
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture\startup\serverStartup.txt
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture\startup
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture\startup.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\architecture
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\balancer-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\building.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\BUILDING.txt
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\cgi-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\changelog.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\class-loader-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\cluster-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\ajp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\cluster-channel.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\cluster-deployer.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\cluster-interceptor.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\cluster-listener.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\cluster-manager.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\cluster-membership.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\cluster-receiver.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\cluster-sender.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\cluster-valve.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\cluster.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\context.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\engine.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\executor.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\filter.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\globalresources.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\host.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\http.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\jar-scanner.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\listeners.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\loader.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\manager.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\realm.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\resources.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\server.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\service.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\systemprops.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config\valve.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\config
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\connectors.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\default-servlet.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\deployer-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\developers.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\elapi\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\elapi
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\extras.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\funcspecs\fs-admin-apps.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\funcspecs\fs-admin-objects.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\funcspecs\fs-admin-opers.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\funcspecs\fs-default.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\funcspecs\fs-jdbc-realm.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\funcspecs\fs-jndi-realm.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\funcspecs\fs-memory-realm.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\funcspecs\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\funcspecs\mbean-names.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\funcspecs
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\html-manager-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\add.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\asf-logo.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\code.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\design.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\docs.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\fix.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\printer.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\tomcat.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\tomcat.svg
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\update.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images\void.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\images
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\introduction.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\jasper-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\jndi-datasource-examples-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\jndi-resources-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\jspapi\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\jspapi
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\logging.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\manager-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\maven-jars.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\mbeans-descriptor-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\monitoring.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\proxy-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\realm-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\RELEASE-NOTES.txt
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\RUNNING.txt
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\security-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\security-manager-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\servletapi\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\servletapi
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\setup.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\ssi-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\ssl-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\tribes\developers.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\tribes\faq.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\tribes\interceptors.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\tribes\introduction.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\tribes\membership.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\tribes\setup.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\tribes\status.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\tribes\transport.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\tribes
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\virtual-hosting-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\WEB-INF\web.xml
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\WEB-INF
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\windows-auth-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs\windows-service-howto.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\docs
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\async\async1.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\async\async1.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\async\async3.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\async\async3.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\async\index.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\async\index.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\async
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal\cal1.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal\cal1.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal\cal2.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal\cal2.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal\calendar.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal\Entries.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal\Entry.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal\JspCalendar.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal\login.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal\TableBean.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\cal
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\chat\index.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\chat\index.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\chat\login.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\chat\login.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\chat\post.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\chat\post.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\chat
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\checkbox\check.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\checkbox\checkresult.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\checkbox\checkresult.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\checkbox\CheckTest.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\checkbox\cresult.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\checkbox
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\colors\clr.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\colors\ColorGameBean.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\colors\colors.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\colors\colrs.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\colors\colrs.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\colors
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\dates\date.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\dates\date.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\dates\date.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\dates
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\error\er.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\error\err.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\error\err.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\error\error.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\error\errorpge.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\error\errorpge.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\error
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\forward\forward.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\forward\forward.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\forward\fwd.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\forward\one.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\forward\one.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\forward\two.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\forward
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\images\code.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\images\execute.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\images\read.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\images\return.gif
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\images
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\include\foo.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\include\foo.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\include\foo.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\include\inc.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\include\include.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\include\include.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\include
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\index.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\basic-arithmetic.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\basic-arithmetic.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\basic-arithmetic.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\basic-comparisons.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\basic-comparisons.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\basic-comparisons.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\composite.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\composite.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\composite.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\functions.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\Functions.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\functions.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\functions.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\implicit-objects.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\implicit-objects.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\implicit-objects.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\ValuesBean.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el\ValuesTag.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\el
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute\FooBean.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute\HelloWorldSimpleTag.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute\jspattribute.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute\jspattribute.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute\jspattribute.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute\shuffle.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute\shuffle.jsp
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute\shuffle.jsp.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute\ShuffleSimpleTag.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute\TileSimpleTag.java.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspattribute
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspx\basic.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspx\basic.jspx
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspx\basic.jspx.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspx\svgexample.html
Deleted file/folder: C:\Users\GYJ\tomcat\webapps\examples\jsp\jsp2\jspx\textRotate.html
分享到:
相关推荐
Java实现实时监控目录下文件变化的方法是指通过Java语言来实现实时监控目录下文件的变化情况,包括文件的创建、删除、修改等操作。这种方法可以应用于各种场景,例如文件系统监控、数据备份、文件同步等。 知识点1...
Java是一种广泛使用的编程语言,尤其在企业级应用中,它提供了强大的文件和目录操作功能。以下是一些关于Java中操作文件和目录的关键知识点: 1. **创建文件夹**: Java中的`File`类提供了创建目录的方法。通过...
4. **构建树结构**:在遍历过程中,根据文件和目录的关系,构造树状数据结构,通常使用栈或递归来实现。 5. **输出到文本文件**:将构建好的树结构转换为字符串,写入到`Dir.txt`文件中,通常每行表示一个文件或目录...
总之,Java提供了多种方式来处理文件和目录的删除操作,开发者可以根据实际需求选择合适的方法。在进行删除操作时,务必谨慎,因为一旦删除,数据通常无法恢复。在生产环境中,确保有备份机制或充分的确认步骤以防止...
# java实现对文件的各种操作的工具类 ## 可以实现的操作有: 1. 删除单个文件 2. 删除文件夹及文件夹下的文件 3. 使用文件流对单个文件进行复制 4. 复制整个文件夹内容(包含子文件夹中的所有内容) 5. ...
在Java编程语言中,遍历一个目录下的所有文件和子目录是一项常见的任务,尤其是在处理文件系统操作时。这里我们将深入探讨如何使用Java API来实现这一功能,并解释相关的知识点。 首先,Java提供了`java.io.File`类...
在Java编程语言中,文件和目录的操作是相当基础且重要的功能。这个名为“Java文件目录操作(模拟DOS)”的程序旨在实现一个简单的命令行界面,让用户能够执行类似于DOS命令的操作,如查看目录(dir)、切换目录(cd...
Java 文件管理器是一款基于Java语言开发的文件管理系统,它提供了用户友好的图形用户界面(GUI),使得用户可以方便地进行文件和目录的操作,如浏览、创建、删除、重命名、移动和复制等。这款应用程序旨在提供一个...
1. **File类**:File类是文件和目录路径名的抽象表示形式。它不包含文件或目录本身的内容,而是提供关于文件或目录的信息,如文件名、是否存在、是否可读写等。创建File对象后,可以通过其方法如exists()、...
`File`类可以用来创建、删除、重命名文件和目录,以及获取文件和目录的属性(如名称、路径、是否存在等)。 2. **递归遍历目录**:由于要复制的目录可能包含多层子目录,因此需要使用递归方法来遍历所有子目录和...
2. **`File.listFiles()` 方法**: 此方法返回一个数组,包含了指定目录下的所有子文件和子目录。如果目录为空,则返回空数组;如果该对象表示的不是一个目录,则返回 `null`。 3. **`File.getPath()` 方法**: 返回...
本文档将详细介绍一个基于Java的实用工具类`FtpClientUtil`,该类提供了一系列功能来与FTP服务器交互,包括连接到服务器、上传文件、下载文件、获取文件列表、删除文件和目录以及关闭连接等操作。 #### 二、`...
- 文件复制、移动和删除(如 `copyFile(File source, File dest)`、`moveFile(File source, File dest)` 和 `deleteFile(String filePath)`); - 文件搜索和遍历(如 `listFilesInDir(File dir)` 和 `searchFile...
4. **文件和目录操作**:通过对`fileNode`类的实例化和操作,实现了文件和目录的创建、删除等功能。 5. **权限控制**:在每个文件或目录节点上设置`userId`属性,以此判断用户是否有权访问该文件或目录。 综上所述...
这个项目的目标是创建一个类似Windows资源管理器的应用,能够显示本地文件系统的内容,支持文件和目录的浏览、创建、删除、重命名等基本操作。 首先,我们需要了解Java中的核心类库`java.io`,它提供了处理输入/...
在Java编程语言中,文件和文件夹的复制是一项常见的任务,尤其在系统迁移、数据备份或者软件部署等场景中。本教程将详细讲解如何使用...通过理解这些概念和实践,你将能够有效地在Java程序中处理文件和目录的复制任务。
jcifs库提供了与SMB服务器通信所需的全部功能,包括创建、读取、写入和删除文件等。 **安装jcifs库:** 要使用jcifs库,首先需要将其添加到项目中。如果是Maven项目,可以在pom.xml文件中添加以下依赖: ```xml ...
在Java编程环境中,读取FTP(File Transfer Protocol)服务器上的文件是一项常见的任务,尤其是在Web服务器和Linux系统环境下。FTP提供了一种可靠的方式来传输文件,使得应用程序可以远程访问和操作存储在FTP服务器...
- 可以注册三种基本事件:`ENTRY_CREATE`(文件或目录创建)、`ENTRY_DELETE`(文件或目录删除)和`ENTRY_MODIFY`(文件或目录修改)。 4. **事件处理**: - 监听器通过调用`WatchKey.pollEvents()`获取发生的...
这两个类提供了诸如打开、读取、写入、删除和重命名文件等方法。例如,要读取远程文件,可以先调用`openFile()`获取文件句柄,再创建`InputStream`来读取文件内容。 3. **异常处理和安全考虑**:在进行SSH操作时,...