java判断指定路径文件夹是否存在,若不存在则创建新的文件夹

//dirPath  :文件夹磁盘路径 

private static void isChartPathExist(String dirPath) {

        File file = new File(dirPath);
        if (!file.exists()) {
            file.mkdirs();
        }
    }

猜你喜欢

转载自blog.csdn.net/lfy609225258/article/details/81013638