MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / import

Method import

cmdtools/importnotes.cpp:16–35  ·  view source on GitHub ↗

Perform the import via the command line

Source from the content-addressed store, hash-verified

14
15// Perform the import via the command line
16int ImportNotes::import() {
17
18 if (inputFile.trimmed() == "") {
19 std::cout << QString(tr("Input file not specified.")).toStdString() << std::endl;
20 return 16;
21 }
22 QFile f(inputFile);
23 if (!f.exists()) {
24 std::cout << QString(tr("Input file not found.")).toStdString() << std::endl;
25 return 16;
26 }
27
28 ImportData importData(false,true,0);
29 importData.import(inputFile);
30 if (importData.lastError != 0) {
31 std::cout << importData.errorMessage.toStdString() << std::endl;
32 return 16;
33 }
34 return 0;
35}

Callers 2

runMethod · 0.45
importNotesMethod · 0.45

Calls 2

QStringClass · 0.50
existsMethod · 0.45

Tested by

no test coverage detected