namespace FileUtils

Overview

namespace FileUtils {

// typedefs

typedef std::string FilePath;

// structs

template <typename C>
struct DotSymbol;
template <>
struct DotSymbol<char>;
template <>
struct DotSymbol<wchar_t>;
template <typename T>
struct FileTraits;
template <>
struct FileTraits<char>;
template <>
struct FileTraits<wchar_t>;

// global variables

const char FileSeparator = '\\';

// 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 = InferenceEngine::details::enableIfSupportedChar<C>>
long long fileSize(const std::basic_string<C>& f);

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

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

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

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

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

std::string fromFilePath(const FilePath& path);
FilePath toFilePath(const std::string& path);

} // namespace FileUtils

Detailed Documentation

Global Variables

const char FileSeparator = '\\'

File path separator.