ui: Separated QtCodeSnippet and added QtCodeFile to display filename
This commit is contained in:
@@ -44,3 +44,7 @@ bool FileSystem::exists(const std::string& path)
|
||||
return boost::filesystem::exists(boost::filesystem::path(path));
|
||||
}
|
||||
|
||||
std::string FileSystem::fileName(const std::string& path)
|
||||
{
|
||||
return boost::filesystem::path(path).filename().generic_string();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ public:
|
||||
const std::string& path, const std::vector<std::string>& extensions
|
||||
);
|
||||
static bool exists(const std::string& path);
|
||||
static std::string fileName(const std::string& path);
|
||||
|
||||
private:
|
||||
static bool isValidExtension(const std::string& filepath, const std::vector<std::string>& extensions);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user