package com.yjl.javabase.nio;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * Created by on 12/17/15.
 */
public class PathGet {
    public static void main(String[] args) {
        String home = "/home/yangjunlin/iedaWorkspace/WhileTrueCoding/JavaBase/doc/";
        Path path = Paths.get(home, "/test/buaa/");
        if (!Files.exists(path)) {
            try {
                Files.createDirectories(path);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}

@@ -384,16 +384,18 @@
 %0A       
+/*
  if (!Fi
@@ -564,24 +564,500 @@
           %7D%0A
+        %7D*/%0A        try %7B%0A            checkPath(path);%0A        %7D catch (Exception e) %7B%0A            System.out.println(e.getMessage());%0A        %7D%0A%0A    %7D%0A%0A    private static void checkPath(Path path) throws Exception %7B%0A        if (!Files.exists(path)) %7B%0A            try %7B%0A                Files.createDirectories(path);%0A            %7D catch (IOException e) %7B%0A                e.printStackTrace();%0A            %7D%0A        %7Delse %7B%0A            throw new Exception(%22the path is exist%22);%0A
         %7D%0A  

add PathGest.java and splitTest.java