summaryrefslogtreecommitdiff
path: root/src/envfs.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-12-24 10:55:55 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2020-12-24 10:55:55 -0500
commit5183b2f47ad240174bf653b299af9e068a3b83e4 (patch)
treeb611c98fe9c6b89975acc2313676ce8a14ac673f /src/envfs.h
parentc8cff6166d05e77c843bb727702607f970d3d030 (diff)
optimizations for download manager:
- use envfs for walking directory - minimize string copies, disk access - use set of filenames to check for duplicates - use file size from envfs
Diffstat (limited to 'src/envfs.h')
-rw-r--r--src/envfs.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/envfs.h b/src/envfs.h
index e4d98d71..62540e18 100644
--- a/src/envfs.h
+++ b/src/envfs.h
@@ -12,8 +12,9 @@ struct File
std::wstring name;
std::wstring lcname;
FILETIME lastModified;
+ uint64_t size;
- File(std::wstring_view name, FILETIME ft);
+ File(std::wstring_view name, FILETIME ft, uint64_t size);
};
struct Directory
@@ -174,7 +175,7 @@ private:
using DirStartF = void (void*, std::wstring_view);
using DirEndF = void (void*, std::wstring_view);
-using FileF = void (void*, std::wstring_view, FILETIME);
+using FileF = void (void*, std::wstring_view, FILETIME, uint64_t);
void setHandleCloserThreadCount(std::size_t n);