namespace FileUtils

Overview

namespace FileUtils {

// typedefs

typedef typename std::enable_if<(std::is_same<C, char>::value||std::is_same<C, wchar_t>::value)>::type enableIfSupportedChar;

// global functions

std::string absoluteFilePath(const std::string& filePath);
void createDirectoryRecursive(const std::string& dirPath);
bool directoryExists(const std::string& path);
long long fileSize(const char \* fileName);

template <typename C, typename = enableIfSupportedChar<C>>
long long fileSize(const std::basic_string<C>& f);

template <typename C, typename = enableIfSupportedChar<C>>
bool fileExist(const C \* fileName);

template <typename C, typename = enableIfSupportedChar<C>>
bool fileExist(const std::basic_string<C>& fileName);

template <typename C, typename = enableIfSupportedChar<C>>
std::basic_string<C> makePath(
    const std::basic_string<C>& folder,
    const std::basic_string<C>& file
    );

template <typename C, typename = enableIfSupportedChar<C>>
std::basic_string<C> fileExt(const std::basic_string<C>& filename);

template <typename C, typename = enableIfSupportedChar<C>>
std::basic_string<C> makePluginLibraryName(
    const std::basic_string<C>& path,
    const std::basic_string<C>& input
    );

} // namespace FileUtils

Detailed Documentation

Typedefs

typedef typename std::enable_if<(std::is_same<C, char>::value||std::is_same<C, wchar_t>::value)>::type enableIfSupportedChar

Enables only char or wchar_t template specializations.

Parameters:

C

A char type