An index of the files under a folder, used to relink by name. More...
Detailed Description
An index of the files under a folder, used to relink by name.
Name-only matching is what every application does and the first thing users complain about, so this also keeps sizes: when several files share a name, the one whose size matches the reference wins, and the rest are still offered rather than hidden.
Public Member Functions | |
| void | scan (const QString &folder, int maxFiles=250000) |
| std::vector< QString > | candidates (const QString &missingPath, qint64 size=-1) const |
| int | fileCount () const noexcept |
| bool | truncated () const noexcept |
| const QString & | root () const noexcept |
Member Function Documentation
◆ candidates()
| std::vector< QString > Process::FileIndex::candidates | ( | const QString & | missingPath, |
| qint64 | size = -1 |
||
| ) | const |
Absolute paths whose file name matches, case-insensitively, best first. size (when > 0) promotes exact size matches, which is the difference between "a file called kick.wav" and "this kick.wav".
◆ scan()
| void Process::FileIndex::scan | ( | const QString & | folder, |
| int | maxFiles = 250000 |
||
| ) |
Walk folder recursively.
maxFiles is a guard against someone pointing this at their home folder or at "/": the scan stops there rather than freezing the application, and truncated() then says the answer may be incomplete.
The documentation for this class was generated from the following files:
- MissingFiles.hpp
- MissingFiles.cpp