diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-12-24 10:55:55 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-12-24 10:55:55 -0500 |
| commit | 5183b2f47ad240174bf653b299af9e068a3b83e4 (patch) | |
| tree | b611c98fe9c6b89975acc2313676ce8a14ac673f /src/downloadmanager.h | |
| parent | c8cff6166d05e77c843bb727702607f970d3d030 (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/downloadmanager.h')
| -rw-r--r-- | src/downloadmanager.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/downloadmanager.h b/src/downloadmanager.h index 953ab88b..5e126f4b 100644 --- a/src/downloadmanager.h +++ b/src/downloadmanager.h @@ -104,7 +104,9 @@ private: bool m_Hidden; static DownloadInfo *createNew(const MOBase::ModRepositoryFileInfo *fileInfo, const QStringList &URLs); - static DownloadInfo *createFromMeta(const QString &filePath, bool showHidden, const QString outputDirectory); + static DownloadInfo *createFromMeta( + const QString &filePath, bool showHidden, const QString outputDirectory, + std::optional<uint64_t> fileSize={}); /** * @brief rename the file |
