mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
@ -53,7 +53,6 @@
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <regex>
|
||||
#include "Directory.h"
|
||||
|
||||
namespace NSDirectory
|
||||
@ -588,19 +587,4 @@ namespace NSDirectory
|
||||
{
|
||||
return Exists(pathName);
|
||||
}
|
||||
|
||||
std::vector<std::wstring> GrepPaths(const std::vector<std::wstring> &paths, const std::wstring &strRegEx)
|
||||
{
|
||||
std::vector<std::wstring> filtredPaths;
|
||||
std::wregex regEx(strRegEx);
|
||||
std::wsmatch wSmath;
|
||||
for (const auto& path : paths)
|
||||
{
|
||||
if (std::regex_match(path, wSmath, regEx))
|
||||
filtredPaths.push_back(path);
|
||||
}
|
||||
|
||||
return filtredPaths;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -68,7 +68,6 @@ namespace NSDirectory
|
||||
KERNEL_DECL void GetFiles2(std::wstring strDirectory, std::vector<std::wstring>& oArray, bool bIsRecursion = false);
|
||||
|
||||
KERNEL_DECL std::vector<std::wstring> GetFiles(std::wstring strDirectory, bool bIsRecursion = false);
|
||||
KERNEL_DECL std::vector<std::wstring> GrepPaths(const std::vector<std::wstring>& paths, const std::wstring& strRegEx);
|
||||
KERNEL_DECL std::vector<std::wstring> GetDirectories(std::wstring strDirectory);
|
||||
KERNEL_DECL bool Exists(const std::wstring& strDirectory);
|
||||
KERNEL_DECL bool CreateDirectory(const std::wstring& strDirectory);
|
||||
|
||||
Reference in New Issue
Block a user