package de.knoobie.project.ryou.filesystem.service;

import de.knoobie.project.ryou.filesystem.domain.FileOperationResult;
import de.knoobie.project.ryou.filesystem.utils.InitializeClannadFileSystem;
import java.io.IOException;

public class Ryou {

    public static void main(String[] args) throws IOException {
//        RyouPath watchPath = RyouPath.create("Z:\\Musik.ClannadProject");
//        watchPath.do2();

        FileOperationResult result = InitializeClannadFileSystem.initClannadFileSystem("Z:\\Clannad");

        if (result.isSuccess()) {
            System.out.println("============ SUCCESS =============");
            System.out.println(result.getMessage());
        } else {
            System.out.println("============ FAILED ==============");
            System.out.println(result.getMessage());
            System.out.println("SubMessage: ");
            System.out.println("Submessages: "+result.getSubOperations().size());
            result.getSubOperations().stream().forEach((subResult) -> {
                    System.out.println(">>> "+subResult.getMessage());
//                    subResult.getException().printStackTrace();                
            });
        }
//        System.out.println("isSuccess " + result.isSuccess());
//        System.out.println("Message" + result.getMessage());
//        result.getException().printStackTrace();
    }

}

@@ -48,16 +48,73 @@
 ice;%0D%0A%0D%0A
+import de.knoobie.project.clannadutils.common.NetUtils;%0D%0A
 import d
@@ -373,26 +373,24 @@
 tion %7B%0D%0A
-//
         
 RyouPath
@@ -385,103 +385,347 @@
     
-RyouPath watchPath = RyouPath.create(%22Z:%5C%5CMusik.ClannadProject%22);%0D%0A//        watchPath.do2();%0D%0A
+%0D%0A        if(NetUtils.downloadFromUrl(%22http://vgmdb.net/db/assets/covers/38626-1370611541.png%22, %0D%0A                %22Z:%5C%5CClannad%5C%5C38626-1370611541.png%22))%7B%0D%0A            System.out.println(%22Download successful%22);%0D%0A        %7Delse%7B%0D%0A            System.out.println(%22Nope.%22);%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    private static void initClannadFileStructur() %7B
 %0D%0A  
@@ -826,18 +826,16 @@
 nad%22);%0D%0A
-%0D%0A
         
@@ -1224,17 +1224,19 @@
 sages: %22
-+
+ + 
 result.g
@@ -1344,36 +1344,32 @@
                 
-    
 System.out.print
@@ -1377,17 +1377,19 @@
 n(%22%3E%3E%3E %22
-+
+ + 
 subResul
@@ -1410,299 +1410,34 @@
 );%0D%0A
-//                    subResult.getException().printStackTrace();                %0D%0A            %7D);%0D%0A        %7D%0D%0A//        System.out.println(%22isSuccess %22 + result.isSuccess());%0D%0A//        System.out.println(%22Message%22 + result.getMessage());%0D%0A//        result.getException().printStackTrace();
+            %7D);%0D%0A        %7D
 %0D%0A  

test DownloadFromURL