MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / canClone

Function canClone

launcher/FileSystem.cpp:1255–1263  ·  view source on GitHub ↗

* @brief if the Filesystem is reflink/clone capable and both paths are on the same device * */

Source from the content-addressed store, hash-verified

1253 *
1254 */
1255bool canClone(const QString& src, const QString& dst)
1256{
1257 auto srcVInfo = statFS(src);
1258 auto dstVInfo = statFS(dst);
1259
1260 bool sameDevice = srcVInfo.rootPath == dstVInfo.rootPath;
1261
1262 return sameDevice && canCloneOnFS(srcVInfo) && canCloneOnFS(dstVInfo);
1263}
1264
1265/**
1266 * @brief reflink/clones a directory and it's contents from src to dest

Callers 1

operator()Method · 0.85

Calls 2

statFSFunction · 0.85
canCloneOnFSFunction · 0.85

Tested by

no test coverage detected