Files
Sourcetrail/src/lib/utility/file/FileSystem.h
T
malte_langkabel a524a7a71c ui: file not up to date display
* the codeview now displays a hatched background for a filename when the file's content has changed or the file does not exist anymore.
* added TimePoint class to encapsulate boost.
2015-11-03 10:29:29 +01:00

40 lines
1.3 KiB
C++

#ifndef FILE_SYSTEM_H
#define FILE_SYSTEM_H
#include <string>
#include <vector>
#include "utility/file/FileInfo.h"
#include "utility/TimePoint.h"
class FileSystem
{
public:
static std::vector<std::string> getFileNamesFromDirectory(
const std::string& path, const std::vector<std::string>& extensions);
static std::vector<std::string> getFileNamesFromDirectoryUpdatedAfter(
const std::string& path, const std::vector<std::string>& extensions, const std::string& timeString);
static FileInfo getFileInfoForPath(FilePath filePath);
static std::vector<FileInfo> getFileInfosFromPaths(
const std::vector<FilePath>& paths, const std::vector<std::string>& fileExtensions);
static TimePoint getLastWriteTime(const FilePath& filePath);
static std::string getTimeStringNow();
static std::vector<FilePath> getSubDirectories(const FilePath& path);
static bool exists(const std::string& path);
static std::string fileName(const std::string& path);
static std::string absoluteFilePath(const std::string& path);
static std::string extension(const std::string& path);
static std::string filePathWithoutExtension(const std::string& path);
static bool hasExtension(const std::string& filepath, const std::vector<std::string>& extensions);
static bool equivalent(const std::string& pathA, const std::string& pathB);
};
#endif // FILE_SYSTEM_H