From c3f63ff55b269b070503bc2fe3c2bb9021c69e36 Mon Sep 17 00:00:00 2001 From: DevSnaith <65865554+DevSnaith@users.noreply.github.com> Date: Wed, 19 Apr 2023 10:53:36 +0300 Subject: [PATCH] soon... --- src/org/eu/lumiere/io/WebFolder.java | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/org/eu/lumiere/io/WebFolder.java diff --git a/src/org/eu/lumiere/io/WebFolder.java b/src/org/eu/lumiere/io/WebFolder.java new file mode 100644 index 0000000..02c41f1 --- /dev/null +++ b/src/org/eu/lumiere/io/WebFolder.java @@ -0,0 +1,29 @@ +package org.eu.lumiere.io; + +import java.io.File; +import java.net.Socket; + +import org.eu.lumiere.net.RequestHandler; +import org.eu.lumiere.net.http.HTTPController; +import org.eu.lumiere.net.http.HTTPRequest; +import org.eu.lumiere.net.http.HTTPResponse; + +public class WebFolder implements RequestHandler { + + @SuppressWarnings("unused") + private HTTPController controller; + + public WebFolder(File folder) { + if(folder == null) + throw new NullPointerException("WebFolder folder path cannot == null"); + else if(!folder.isDirectory()) + throw new IllegalAccessError("WebFolder need a directory"); + controller = new HTTPController(); + } + + @Override + public void onRequestReceived(Socket socket, HTTPRequest request, HTTPResponse response) { + + } + +}