new xt shell based on JS transparency layer
[org.ibex.xt-crawshaw.git] / src / java / org / ibex / xt / shell / Env.java
diff --git a/src/java/org/ibex/xt/shell/Env.java b/src/java/org/ibex/xt/shell/Env.java
deleted file mode 100644 (file)
index f09cc95..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.ibex.xt.shell;
-
-import java.io.IOException;
-
-public abstract class Env {
-    /** Current JS path using '.' as a seperator. */
-    public String path = "";
-
-    public Command[] commands = new Command[0];
-
-    /** Returns the command matching the given name. */
-    public Command command(String name) {
-        for (int i=0; i < commands.length; i++)
-            if (commands[i].name().equals(name)) return commands[i];
-        return null;
-    }
-
-    /** Returns a path, based on console-style representation. */
-    public String path(String c) {
-        if (c.equals("") || c.equals(".")) {
-            c = ".";
-        } else if (c.equals("..")) {
-            c = path;
-            c = c.substring(0, c.lastIndexOf('.'));
-            if (c.equals("")) c = ".";
-        } else {
-            if (c.charAt(0) != '.') c = path + "." + c;
-            if (c.length() > 1 && c.charAt(c.length() - 1) == '.')
-                c = c.substring(0, c.length() - 1);
-        }
-        return c;
-    }
-
-    public abstract Request.Response send(Request request) throws IOException;
-}