/*****************************************************************************/
/* File name: Directory.java                                                 */
/* Purpose: to work on directories                                           */
/* Last modified: 18.04.99                                                   */
/* Author: Victor Klimov, 1999                                               */
/*                                                                           */
/* This program is distributed in the hope that it will be useful, but       */
/* WITHOUT ANY WARRANTY; without even the implied warranty of                */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General */
/* Public License for more details.                                          */
/*                                                                           */
/* This software is distributed under the terms                              */
/* of the GNU General Public License as published                            */
/* by the Free Software Foundation; either version 2, or (at your option)    */
/* any later version.                                                        */
/* See file COPYING for your rights (GNU GPL)                                */
/*****************************************************************************/

package util;

import general.Constants;



public
class

Directory

{

  private final static java.lang.String RCSID = "$Header: /d/JTAR12/util/RCS/Directory.java,v 1.1 1999/04/18 21:16:27 vklimov Exp $";


  Directory( )
/*****************************************************************************/
/* Function name: Directory                                                  */
/* File name: Directory.java                                                 */
/* Purpose: constructor for the object Directory                             */
/* Parameters:                                                               */
/* Returns:                                                                  */
/* Last modified: 18.04.99                                                   */
/* Author: Victor Klimov, 1999                                               */
/*****************************************************************************/
    {
                                                       /* Directory */
/*---------------------------------------------------------------------------*/

    }
/*end of Directory*/


  public
  static
  java.lang.String

  getCurrentDirFullPath()
/*****************************************************************************/
/* Function name: getCurrentDirFullPath                                      */
/* File name: Directory.java                                                 */
/* Purpose: to return the current directory full path                        */
/* Parameters:                                                               */
/* Returns: the full path of the current directory                           */
/* Last modified: 18.04.99                                                   */
/* Author: Victor Klimov, 1999                                               */
/*****************************************************************************/
    {
      java.lang.String currentDir;
                                                /* getCurrentDirFullPath */
/*---------------------------------------------------------------------------*/

      try
        {
          currentDir = java.lang.System.getProperty(
                         general.Constants.
                           SYSTEM_PROPERTY_USER_CURRENT_DIR );
        }
      catch( SecurityException e)
        {
          currentDir = "";
        }
    /*end of try-catch*/

      if (currentDir != (java.lang.String) null)
        return currentDir;
      else
        return "";
    /*end of if on null*/

    }
/*end of getCurrentDirFullPath*/


  public
  static
  void

  main( java.lang.String [] args )
/*****************************************************************************/
/* Function name: main                                                       */
/* File name: Directory.java                                                 */
/* Purpose: to test the Directory class                                      */
/* Parameters:                                                               */
/* Returns:                                                                  */
/* Last modified: 18.04.99                                                   */
/* Author: Victor Klimov, 1999                                               */
/*****************************************************************************/
    {
                                                         /* main */
/*---------------------------------------------------------------------------*/

       System.out.println( "\nthe current directory is " +
                           getCurrentDirFullPath()         );
    }
/*end of main*/

} /*end of Directory */

/*****************************************************************************/
/* End of file: Directory.java                                               */
/*****************************************************************************/
