MCPcopy Create free account
hub / github.com/PrismLauncher/PrismLauncher / statFS

Function statFS

launcher/FileSystem.cpp:1212–1231  ·  view source on GitHub ↗

* @brief colect information about the filesystem under a file * */

Source from the content-addressed store, hash-verified

1210 *
1211 */
1212FilesystemInfo statFS(const QString& path)
1213{
1214 FilesystemInfo info;
1215
1216 QStorageInfo storage_info(nearestExistentAncestor(path));
1217
1218 info.fsTypeName = storage_info.fileSystemType();
1219
1220 info.fsType = getFilesystemTypeFuzzy(info.fsTypeName);
1221
1222 info.blockSize = storage_info.blockSize();
1223 info.bytesAvailable = storage_info.bytesAvailable();
1224 info.bytesFree = storage_info.bytesFree();
1225 info.bytesTotal = storage_info.bytesTotal();
1226
1227 info.name = storage_info.name();
1228 info.rootPath = storage_info.rootPath();
1229
1230 return info;
1231}
1232
1233/**
1234 * @brief if the Filesystem is reflink/clone capable

Callers 6

RemoveInvalidPathCharsFunction · 0.85
canCloneOnFSFunction · 0.85
canCloneFunction · 0.85
clone_fileFunction · 0.85
canLinkOnFSFunction · 0.85
CopyInstanceDialogMethod · 0.85

Calls 3

nearestExistentAncestorFunction · 0.85
getFilesystemTypeFuzzyFunction · 0.85
nameMethod · 0.45

Tested by

no test coverage detected