summaryrefslogtreecommitdiff
path: root/src/envfs.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-02-12 16:14:18 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2020-02-18 17:25:03 -0500
commitd082a91ad617808a6dd89ad9fdb9479524795520 (patch)
tree1e0f10508d6779434f501638e647ef19d83eb46a /src/envfs.h
parent7860e927a771d6a07d9b1905071bd389a0e64001 (diff)
faster getSubDirectory() for env::Directory, added lcname
instrumentation
Diffstat (limited to 'src/envfs.h')
-rw-r--r--src/envfs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/envfs.h b/src/envfs.h
index 6cc98775..6e0da6d0 100644
--- a/src/envfs.h
+++ b/src/envfs.h
@@ -16,6 +16,8 @@ struct File
struct Directory
{
std::wstring name;
+ std::wstring lcname;
+
std::list<Directory> dirs;
std::list<File> files;
};
@@ -77,6 +79,14 @@ public:
}
}
+ template <class F>
+ void forEach(F&& f)
+ {
+ for (auto& ti : m_threads) {
+ f(ti.o);
+ }
+ }
+
private:
struct ThreadInfo
{
@@ -94,6 +104,7 @@ using DirEndF = void (void*, std::wstring_view);
using FileF = void (void*, std::wstring_view, FILETIME);
void setHandleCloserThreadCount(std::size_t n);
+void shrinkFs();
void forEachEntry(
const std::wstring& path, void* cx,