private void handleCommand()

in commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/Shell.java [178:203]


    private void handleCommand(final String[] cmd) throws Exception {
        final String cmdName = cmd[0];
        if (cmdName.equalsIgnoreCase("cat")) {
            cat(cmd);
        } else if (cmdName.equalsIgnoreCase("cd")) {
            cd(cmd);
        } else if (cmdName.equalsIgnoreCase("cp")) {
            cp(cmd);
        } else if (cmdName.equalsIgnoreCase("help") || cmdName.equals("?")) {
            help();
        } else if (cmdName.equalsIgnoreCase("ls")) {
            ls(cmd);
        } else if (cmdName.equalsIgnoreCase("pwd")) {
            pwd();
        } else if (cmdName.equalsIgnoreCase("pwfs")) {
            pwfs();
        } else if (cmdName.equalsIgnoreCase("rm")) {
            rm(cmd);
        } else if (cmdName.equalsIgnoreCase("touch")) {
            touch(cmd);
        } else if (cmdName.equalsIgnoreCase("info")) {
            info(cmd);
        } else {
            System.err.println("Unknown command \"" + cmdName + "\" (Try 'help').");
        }
    }