MCPcopy Create free account
hub / github.com/QNapi/qnapi / dryCopy

Method dryCopy

libqnapi/src/subtitlematcher.cpp:110–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110bool SubtitleMatcher::dryCopy(QString srcFilePath, QString dstFilePath) const {
111 QFile dstFile(dstFilePath), srcFile(srcFilePath);
112 bool result = false;
113
114 if (!dstFile.open(QIODevice::WriteOnly) ||
115 !srcFile.open(QIODevice::ReadOnly)) {
116 dstFile.close();
117 } else {
118 result = dstFile.write(srcFile.readAll()) > 0;
119 srcFile.close();
120 dstFile.close();
121 }
122
123 return result;
124}
125
126void SubtitleMatcher::fixFilePermissions(QString targetSubtitlesFilePath,
127 QString changePermissionsTo) const {

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected