-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
36 lines (31 loc) · 839 Bytes
/
main.cpp
File metadata and controls
36 lines (31 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <QCoreApplication>
#include <QDir>
#include <QDebug>
#include <QElapsedTimer>
#include <locale>
#include "scaner.h"
#include "processor.h"
#include "printer.h"
int main(int argc, char *argv[])
{
setlocale(LC_ALL, "Russian");
QString path;
if(argc == 2)
{
path = argv[1];
}
else
{
path = QDir::currentPath();
}
QElapsedTimer timer;
timer.start();
qDebug() << "Scaning folder " << path << endl;
auto fileList = Scaner::scanFolder(path);
qDebug() << "Search duplicate files in folder " << path << endl;
auto dupFileList = Processor::process(fileList);
qDebug() << "Printing duplicate file from folder " << path << endl;
Printer::print(dupFileList);
qDebug() << endl << "Program worked " << timer.elapsed() << " ms" << endl;
return 0;
}