2017-11-15 15:59:39 +00:00
|
|
|
#pragma once
|
2017-11-22 21:29:52 +00:00
|
|
|
#ifndef ES_CORE_UTILS_FILE_SYSTEM_UTIL_H
|
|
|
|
#define ES_CORE_UTILS_FILE_SYSTEM_UTIL_H
|
2017-11-15 15:59:39 +00:00
|
|
|
|
Add getDirContent, getHomePath, getCWDPath, canonicalPath, absolutePath, resolvePath, resolveSymlink, getExtension, removeFile, isAbsolute, isRegularFile, isDirectory, isSymlink, isHidden and isEquivalent
Rename makeGeneric to genericPath and escapePath to escapedPath
Add toUpper
2017-12-04 23:32:04 +00:00
|
|
|
#include <list>
|
2017-11-15 15:59:39 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace Utils
|
|
|
|
{
|
|
|
|
namespace FileSystem
|
|
|
|
{
|
Add getDirContent, getHomePath, getCWDPath, canonicalPath, absolutePath, resolvePath, resolveSymlink, getExtension, removeFile, isAbsolute, isRegularFile, isDirectory, isSymlink, isHidden and isEquivalent
Rename makeGeneric to genericPath and escapePath to escapedPath
Add toUpper
2017-12-04 23:32:04 +00:00
|
|
|
typedef std::list<std::string> stringList;
|
|
|
|
|
|
|
|
stringList getDirContent (const std::string& _path);
|
|
|
|
std::string getHomePath ();
|
|
|
|
std::string getCWDPath ();
|
|
|
|
std::string genericPath (const std::string& _path);
|
|
|
|
std::string escapedPath (const std::string& _path);
|
|
|
|
std::string canonicalPath (const std::string& _path);
|
|
|
|
std::string absolutePath (const std::string& _path, const std::string& _base = getCWDPath());
|
|
|
|
std::string resolvePath (const std::string& _path, const std::string& _relativeTo, const bool _allowHome);
|
|
|
|
std::string resolveSymlink (const std::string& _path);
|
2017-11-22 21:29:52 +00:00
|
|
|
std::string getParent (const std::string& _path);
|
|
|
|
std::string getFileName (const std::string& _path);
|
|
|
|
std::string getStem (const std::string& _path);
|
Add getDirContent, getHomePath, getCWDPath, canonicalPath, absolutePath, resolvePath, resolveSymlink, getExtension, removeFile, isAbsolute, isRegularFile, isDirectory, isSymlink, isHidden and isEquivalent
Rename makeGeneric to genericPath and escapePath to escapedPath
Add toUpper
2017-12-04 23:32:04 +00:00
|
|
|
std::string getExtension (const std::string& _path);
|
|
|
|
bool removeFile (const std::string& _path);
|
|
|
|
bool createDirectory(const std::string& _path);
|
2017-11-22 21:29:52 +00:00
|
|
|
bool exists (const std::string& _path);
|
Add getDirContent, getHomePath, getCWDPath, canonicalPath, absolutePath, resolvePath, resolveSymlink, getExtension, removeFile, isAbsolute, isRegularFile, isDirectory, isSymlink, isHidden and isEquivalent
Rename makeGeneric to genericPath and escapePath to escapedPath
Add toUpper
2017-12-04 23:32:04 +00:00
|
|
|
bool isAbsolute (const std::string& _path);
|
|
|
|
bool isRegularFile (const std::string& _path);
|
|
|
|
bool isDirectory (const std::string& _path);
|
|
|
|
bool isSymlink (const std::string& _path);
|
|
|
|
bool isHidden (const std::string& _path);
|
|
|
|
bool isEquivalent (const std::string& _path1, const std::string& _path2);
|
2017-11-15 15:59:39 +00:00
|
|
|
|
Add getDirContent, getHomePath, getCWDPath, canonicalPath, absolutePath, resolvePath, resolveSymlink, getExtension, removeFile, isAbsolute, isRegularFile, isDirectory, isSymlink, isHidden and isEquivalent
Rename makeGeneric to genericPath and escapePath to escapedPath
Add toUpper
2017-12-04 23:32:04 +00:00
|
|
|
} // FileSystem::
|
2017-11-15 15:59:39 +00:00
|
|
|
|
|
|
|
} // Utils::
|
|
|
|
|
2017-11-22 21:29:52 +00:00
|
|
|
#endif // ES_CORE_UTILS_FILE_SYSTEM_UTIL_H
|