MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / compressDirFiles

Function compressDirFiles

launcher/MMCZip.cpp:97–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97bool compressDirFiles(QuaZip* zip, QString dir, QFileInfoList files, bool followSymlinks)
98{
99 QDir directory(dir);
100 if (!directory.exists())
101 return false;
102
103 for (auto e : files) {
104 auto filePath = directory.relativeFilePath(e.absoluteFilePath());
105 auto srcPath = e.absoluteFilePath();
106 if (followSymlinks) {
107 if (e.isSymLink()) {
108 srcPath = e.symLinkTarget();
109 } else {
110 srcPath = e.canonicalFilePath();
111 }
112 }
113 if (!JlCompress::compressFile(zip, srcPath, filePath))
114 return false;
115 }
116
117 return true;
118}
119
120bool compressDirFiles(QString fileCompressed, QString dir, QFileInfoList files, bool followSymlinks)
121{

Callers 1

createModdedJarFunction · 0.85

Calls 8

QFileInfoClass · 0.85
deletePathFunction · 0.85
existsMethod · 0.80
canonicalFilePathMethod · 0.80
openMethod · 0.80
closeMethod · 0.80
QDirClass · 0.70
isSymLinkMethod · 0.45

Tested by

no test coverage detected