Here you can find the source of checkDir(String path)
private static void checkDir(String path)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { private static void checkDir(String path) { File dist = new File(path); if (dist.exists()) { if (!dist.isDirectory()) { dist.renameTo(new File(dist.getPath() + ".swp." + System.currentTimeMillis())); dist.mkdir();/* w ww. j a va 2 s . com*/ } } else { dist.mkdir(); } } }