This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

Delete all files and directories of specific directory

General questions regarding the development with JVx.

Delete all files and directories of specific directory

Postby Development@SIB » Wed May 14, 2014 3:42 pm

If you want to delete all files and directories of a specific directory - with JVx - check following snippet:

Code: Select all
String sTmp = System.getProperty("java.io.tmpdir");
   
File fi = new File(sTmp, "myapp");
fi.mkdirs();
   
//create temporary files
   
FileUtil.deleteSub(fi);
//or
//FileUtil.delete(fi);
User avatar
Development@SIB
 
Posts: 313
Joined: Mon Sep 28, 2009 1:54 pm

Return to Development