Writing D:/inetpub/webs/vincenzodevivocom/wiki/data/cache/3/333d983240aa41b5270e2412fb074d09.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing D:/inetpub/webs/vincenzodevivocom/wiki/data/cache/3/333d983240aa41b5270e2412fb074d09.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing D:/inetpub/webs/vincenzodevivocom/wiki/data/cache/3/333d983240aa41b5270e2412fb074d09.xhtml failed

File & Directory

Come creare un struttura di directory da un path in Java

How to create directory and all sub-directories in Java

Logger logger = LoggerFactory.getLogger(MyClass.class);
String path = "C:/files/docs";
 
File myFolder = new File(path);
if (!myFolder.exists()) {
  if (!myFolder.mkdirs()) {
    logger.error("Cannot create folders at '{}'", myFolder.getPath());
  } else {
    logger.info("Folders created at '{}'", myFolder.getPath());
  }
}
 
code/java/filedir.txt · Last modified: 2011/05/13 23:40 by Vincenzo De Vivo
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki