File utilities¶
Overview¶
Utility functions to work with files, UNICODE support. More…
// namespaces
namespace FileUtils;
// global functions
std::string FileUtils::absoluteFilePath(const std::string& filePath);
void FileUtils::createDirectoryRecursive(const std::string& dirPath);
bool FileUtils::directoryExists(const std::string& path);
long long FileUtils::fileSize(const char \* fileName);
template <typename C, typename = enableIfSupportedChar<C>>
long long FileUtils::fileSize(const std::basic_string<C>& f);
template <typename C, typename = enableIfSupportedChar<C>>
bool FileUtils::fileExist(const C \* fileName);
template <typename C, typename = enableIfSupportedChar<C>>
bool FileUtils::fileExist(const std::basic_string<C>& fileName);
template <typename C, typename = enableIfSupportedChar<C>>
std::basic_string<C> FileUtils::makePath(
const std::basic_string<C>& folder,
const std::basic_string<C>& file
);
template <typename C, typename = enableIfSupportedChar<C>>
std::basic_string<C> FileUtils::fileExt(const std::basic_string<C>& filename);
std::string InferenceEngine::getIELibraryPath();
Detailed Documentation¶
Utility functions to work with files, UNICODE support.
Global Functions¶
std::string FileUtils::absoluteFilePath(const std::string& filePath)
Interface function to get absolute path of file.
Parameters:
filePath |
|
if any error occurred |
Returns:
Absolute path of file
void FileUtils::createDirectoryRecursive(const std::string& dirPath)
Interface function to create directorty recursively by given path.
Parameters:
dirPath |
|
if any error occurred |
bool FileUtils::directoryExists(const std::string& path)
Interface function to check if directory exists for given path.
Parameters:
path |
|
Returns:
true if directory exists, false otherwise
long long FileUtils::fileSize(const char \* fileName)
Interface function to get the size of a file. The function supports UNICODE path.
Parameters:
fileName |
|
Returns:
size of the file
template <typename C, typename = enableIfSupportedChar<C>>
long long FileUtils::fileSize(const std::basic_string<C>& f)
Function to get the size of a file. The function supports UNICODE path.
Parameters:
f |
|
Returns:
size of the file
template <typename C, typename = enableIfSupportedChar<C>>
bool FileUtils::fileExist(const C \* fileName)
check if file with a given filename exists. The function supports UNICODE path
Parameters:
fileName |
|
Returns:
true is exists
template <typename C, typename = enableIfSupportedChar<C>>
bool FileUtils::fileExist(const std::basic_string<C>& fileName)
check if file with a given filename exists. The function supports UNICODE path
Parameters:
fileName |
|
Returns:
true is exists
CPP Interface function to combint path with filename. The function supports UNICODE path.
Parameters:
folder |
|
file |
|
Returns:
string with combination of the path and the filename divided by file separator
CPP Interface function to extract extension from filename.
Parameters:
filename |
|
Returns:
string with extracted file extension
std::string InferenceEngine::getIELibraryPath()
Returns a path to Inference Engine library.
Returns:
A std::string
path to Inference Engine library