ctDir.h 2.76 KB
/*
 ctDir.h - Provides a mechanism to manage directories.

 Author: Francisco J. Santana Jorge
         <francisco dot santana102 arroba estudiantes dot ulpgc dot es>, 2011

 Inst. Universitario de Sistemas Inteligentes y Aplicaciones Numéricas
 Universidad de Las Palmas de Gran Canaria

 Copyright (C) 2003,2007,2009,2010
    Universidad de Las Palmas de Gran Canaria (ULPGC) (<http://www.ulpgc.es>)

    This software is a collective project which has been designed, developed and
    written, and is maintained by members, students and collaborators of the División
    de Inteligencia Artificial y Sistemas (DIAS) at the Instituto Universitario de
    Sistemas Inteligentes y Aplicaciones Numéricas en Ingeniería (SIANI)
    (<http://www.siani.es/>), and also of the Departamento de Informática y Sistemas
    (DIS) (<http://www.dis.ulpgc.es>) both at ULPGC. The AUTHOR file lists all
    developers and contributors.The particular authors of each file are explicitly
    specified on each one of them.

 This file is part of the CoolBOT Project.
 The CoolBOT Project is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or any
 later version.

 The CoolBOT Project 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.

 You should have received a copy (COPYING file) of the GNU General Public License
 along with the CoolBOT Project . If not, see <http://www.gnu.org/licenses/>.

 In addition to the GNU General Public License, the CoolBOT Project Compiler License
 Exception is applicable to the C++ skeletons generated by the CoolBOT Compiler
 (coolbot-c). The purpose of this Exception is to allow distribution of  CoolBOT
 Compiler's (coolbot-c) typical output under terms of the recipient's choice
 (including proprietary). You should have received a copy of the CoolBOT Project
 Compiler License Exception (COPYING.EXCEPTION file) along with the CoolBOT Project.
 If not see <http://www.coolbotproject.org>.
*/

#ifndef __ctDir_h
#define __ctDir_h

#include <string>
#include <unistd.h>

/**
 ** The ctDir class provides a mechanism to manage directories.
 **/
class ctDir
{
public:

  /**
   ** Creates the directory.
   ** @param Name the directory name
   ** @return Returns true if the directory is created.
   **/
  static bool Create(const std::string Name);

  /**
   ** Change working directory.
   ** @param Name the directory name
   ** @return Returns true if you change the working directory.
   **/
  static bool Change(const std::string Name);

}; /// The ctDir class

#endif ///__ctDir_h