You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by gg...@apache.org on 2003/12/02 20:22:56 UTC

cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/example Shell.java

ggregory    2003/12/02 11:22:56

  Modified:    vfs/src/java/org/apache/commons/vfs/example Shell.java
  Log:
  Add "quit" as a synonym for "exit".
  
  Revision  Changes    Path
  1.6       +7 -3      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/example/Shell.java
  
  Index: Shell.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/example/Shell.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Shell.java	28 Nov 2003 17:27:16 -0000	1.5
  +++ Shell.java	2 Dec 2003 19:22:56 -0000	1.6
  @@ -80,6 +80,7 @@
    */
   public class Shell
   {
  +    private static final String CVS_ID = "$Id$";
       private final FileSystemManager mgr;
       private FileObject cwd;
       private BufferedReader reader;
  @@ -107,6 +108,7 @@
   
       private void go() throws Exception
       {
  +        System.out.println("VFS Shell [" + CVS_ID + "]");
           while ( true )
           {
               final String[] cmd = nextCommand();
  @@ -119,7 +121,7 @@
                   continue;
               }
               final String cmdName = cmd[ 0 ];
  -            if ( cmdName.equalsIgnoreCase( "exit" ) )
  +            if (cmdName.equalsIgnoreCase( "exit" ) || cmdName.equalsIgnoreCase( "quit" ))
               {
                   return;
               }
  @@ -189,7 +191,9 @@
           System.out.println( "pwd                Displays current folder." );
           System.out.println( "rm <path>          Deletes a file or folder." );
           System.out.println( "touch <path>       Sets the last-modified time of a file." );
  -    }
  +        System.out.println( "exit       Exits this program." );
  +        System.out.println( "quit       Exits this program." );
  +       }
   
       /** Does an 'rm' command. */
       private void rm( final String[] cmd ) throws Exception
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org