Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.File;

public class Main {
    public static void makeDirectoryOnly(File file) {
        String[] partial = file.getAbsolutePath().split("/");
        String path = "/";
        for (int i = 0; i < partial.length - 1; ++i) {
            path += partial[i] + '/';
        }
        new File(path).mkdirs();
    }
}