// joi/10/juno/MkdirCommand.java // // // Copyright 2003, Bill Campbell and Ethan Bolker import java.util.*; /** * The Juno shell command to create a new directory. * Usage: *
* mkdir directory-name ** * @version 10 */ public class MkdirCommand extends ShellCommand { MkdirCommand() { super( "create a subdirectory of the current directory", "directory-name" ); } /** * Create a new Directory in the current Directory. * * @param args the remainder of the command line. * @param sh the current shell. * * @exception JunoException for reporting errors. */ public void doIt( StringTokenizer args, Shell sh ) throws JunoException { String filename = args.nextToken(); new Directory( filename, sh.getUser(), sh.getDot() ); } }