package com.timepath.vfs.examples;

import com.sun.nio.zipfs.JarFileSystemProvider;
import com.timepath.vfs.MockFile;
import com.timepath.vfs.SimpleVFile;
import com.timepath.vfs.server.ftp.FtpServer;
import com.timepath.vfs.server.fuse.FuseServer;
import com.timepath.vfs.server.http.HttpServer;
import com.timepath.vfs.server.sftp.SftpServer;

import java.io.IOException;

public class Main {

    public static void main(String[] args) throws IOException {
        FtpServer ftp = new FtpServer(2121, null);
        addMocks(ftp);
        ftp.run();

        FuseServer fuse = new FuseServer("test");
        addMocks(fuse);
        fuse.run();

        HttpServer http = new HttpServer(8000);
        addMocks(http);
        http.run();

        SftpServer sftp = new SftpServer(1234);
        addMocks(sftp);
        sftp.run();
        new JarFileSystemProvider();
    }

    private static void addMocks(SimpleVFile root) {
        root
                .add(new MockFile("test.txt", "It works!"))
                .add(new MockFile("world.txt", "Hello world"))
                .add(new MockFile("folder")
                                .add(new MockFile("file", "test"))
                                .add(new MockFile("test.txt", "It works!"))
                );
    }

}
@@ -33,56 +33,8 @@
 s;%0A%0A
-import com.sun.nio.zipfs.JarFileSystemProvider;%0A
 impo
@@ -783,45 +783,8 @@
 ();%0A
-        new JarFileSystemProvider();%0A
     

Remove redundant object creation