File NativeFilenames.h

Copyright

This code is licensed under the 3-clause BSD license.

Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.

See LICENSE.txt for details.

namespace Scine

This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.

This header contains alias definitions defining which classes to use for the different degrees of derivatives.

namespace Utils
class NativeFilenames
#include <NativeFilenames.h>

This class contains utility functions for storing file paths in strings, and cares for cross-platform issues. Hides the use of Boost::filesystem.

Public Static Functions

static char getDirectorySeparatorChar()
static std::string getDirectorySeparatorString()
template<typename T, typename U>
std::string combinePathSegments(const T &l, const U &r)

concatenates path segments by adding a separator if necessary.

template<typename T, typename ...Ts>
std::string combinePathSegments(const T &l, const Ts&... r)

Concatenates multiple path segments contained in the argument pack.

static std::string removeTrailingSeparator(const std::string &path)

remove the directory separator at the end of the string if present.

static std::string addTrailingSeparator(const std::string &path)

add a directory separator at the end of the string if none is present.

static std::string removeExtension(const std::string &filename)

removes the extension from the file called filename.

Private Static Functions

static std::string combinePathSegmentsImpl(const std::string &left, const std::string &right)

concatenates path segments by adding a separator if necessary.