Skip to content
Snippets Groups Projects
Commit 88be462e authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Style.

parent 48bcf28b
No related branches found
No related tags found
No related merge requests found
/**
* \file
* \author Lars Bilke
* \date Apr. 2010
* \brief Filename manipulation routines implementation.
*
* \copyright
* Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*
* \file FileTools.cpp
*
* Created on 2010-04-26 by Lars Bilke
*
*/
#include "FileTools.h"
......@@ -18,7 +19,6 @@
namespace BaseLib
{
/**
* Returns true if given file exists. From http://www.techbytes.ca/techbyte103.html
*/
......@@ -32,13 +32,10 @@ bool IsFileExisting(const std::string &strFilename)
intStat = stat(strFilename.c_str(),&stFileInfo);
if(intStat == 0)
{
// We were able to get the file attributes
// so the file obviously exists.
blnReturn = true;
}
else
{
// We were not able to get the file attributes.
// This may mean that we don't have permission to
// access the folder which contains this file. If you
......@@ -46,9 +43,8 @@ bool IsFileExisting(const std::string &strFilename)
// return values of stat which will give you
// more details on why stat failed.
blnReturn = false;
}
return(blnReturn);
return blnReturn;
}
/**
......@@ -135,6 +131,4 @@ std::string extractPath(std::string const& pathname)
const size_t pos = findLastPathSeparator(pathname);
return pathname.substr(0, pos + 1);
}
} // end namespace BaseLib
/**
* \file
* \author Lars Bilke
* \date Apr. 2010
* \brief Filename manipulation routines.
*
* \copyright
* Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*
* \file FileTools.h
*
* Created on 2010-04-26 by Lars Bilke
*
*/
#ifndef FILETOOLS_H
#define FILETOOLS_H
#include <string>
#include <fstream>
#include <string>
namespace BaseLib
{
/**
* \brief Returns true if given file exists. From http://www.techbytes.ca/techbyte103.html
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment