1   // joi/10/juno/MkdirCommand.java                         
2   //                                                            
3   //                                                            
4   // Copyright 2003, Bill Campbell and Ethan Bolker                         
5                                                               
6   import java.util.*;
7   
8   /**
9    * The Juno shell command to create a new directory.
10   * Usage:
11   * <pre>
12   *     mkdir directory-name
13   * </pre>
14   *
15   * @version 10
16   */
17  
18  public class MkdirCommand extends ShellCommand 
19  {
20      MkdirCommand() 
21      {
22          super( "create a subdirectory of the current directory",
23                 "directory-name" );
24      }
25  
26      /**
27       * Create a new Directory in the current Directory.    
28       *
29       * @param args the remainder of the command line.
30       * @param sh the current shell.
31       *
32       * @exception JunoException for reporting errors.
33       */
34  
35      public void doIt( StringTokenizer args, Shell sh )
36           throws JunoException 
37      {
38          String filename = args.nextToken();
39          new Directory( filename, sh.getUser(), sh.getDot() );
40      }
41  }
42