2011-08-19 19:06:09 +00:00
|
|
|
/**
|
|
|
|
* Open Morrowind - an opensource Elder Scrolls III: Morrowind
|
|
|
|
* engine implementation.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011 Open Morrowind Team
|
|
|
|
*
|
|
|
|
* This program 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
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file components/files/linuxpath.hpp */
|
|
|
|
|
|
|
|
#ifndef COMPONENTS_FILES_LINUXPATH_H
|
|
|
|
#define COMPONENTS_FILES_LINUXPATH_H
|
|
|
|
|
2011-09-27 23:40:27 +00:00
|
|
|
#if defined(__linux__) || defined(__FreeBSD__)
|
2011-08-19 19:06:09 +00:00
|
|
|
|
|
|
|
#include <boost/filesystem.hpp>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \namespace Files
|
|
|
|
*/
|
|
|
|
namespace Files
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \struct LinuxPath
|
|
|
|
*/
|
|
|
|
struct LinuxPath
|
|
|
|
{
|
2012-09-08 16:47:31 +00:00
|
|
|
LinuxPath(const std::string& application_name);
|
|
|
|
|
2011-08-19 19:06:09 +00:00
|
|
|
/**
|
2012-01-21 00:14:35 +00:00
|
|
|
* \brief Return path to the user directory.
|
2011-08-19 19:06:09 +00:00
|
|
|
*
|
|
|
|
* \return boost::filesystem::path
|
|
|
|
*/
|
2012-01-21 00:14:35 +00:00
|
|
|
boost::filesystem::path getUserPath() const;
|
2011-08-19 19:06:09 +00:00
|
|
|
|
|
|
|
/**
|
2012-02-23 22:21:17 +00:00
|
|
|
* \brief Return path to the global (system) directory where game files could be placed.
|
2011-08-19 19:06:09 +00:00
|
|
|
*
|
|
|
|
* \return boost::filesystem::path
|
|
|
|
*/
|
2012-01-21 00:14:35 +00:00
|
|
|
boost::filesystem::path getGlobalPath() const;
|
2011-08-19 19:06:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Return path to the runtime configuration directory which is the
|
|
|
|
* place where an application was started.
|
|
|
|
*
|
|
|
|
* \return boost::filesystem::path
|
|
|
|
*/
|
2012-01-21 00:14:35 +00:00
|
|
|
boost::filesystem::path getLocalPath() const;
|
2012-01-21 16:58:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief
|
|
|
|
*
|
|
|
|
* \return boost::filesystem::path
|
|
|
|
*/
|
|
|
|
boost::filesystem::path getGlobalDataPath() const;
|
|
|
|
|
2012-09-02 17:40:26 +00:00
|
|
|
/**
|
|
|
|
* \brief
|
|
|
|
*
|
|
|
|
* \return boost::filesystem::path
|
|
|
|
*/
|
|
|
|
boost::filesystem::path getCachePath() const;
|
|
|
|
|
2012-01-17 18:18:17 +00:00
|
|
|
/**
|
|
|
|
* \brief Gets the path of the installed Morrowind version if there is one.
|
|
|
|
*
|
|
|
|
* \return boost::filesystem::path
|
|
|
|
*/
|
2012-01-21 16:58:49 +00:00
|
|
|
boost::filesystem::path getInstallPath() const;
|
2012-09-08 16:47:31 +00:00
|
|
|
|
|
|
|
std::string mName;
|
2011-08-19 19:06:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace Files */
|
|
|
|
|
2011-09-27 23:40:27 +00:00
|
|
|
#endif /* defined(__linux__) || defined(__FreeBSD__) */
|
2011-08-19 19:06:09 +00:00
|
|
|
|
|
|
|
#endif /* COMPONENTS_FILES_LINUXPATH_H */
|