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

Function statFS

launcher/FileSystem.cpp:1221–1240  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1219 *
1220 */
1221FilesystemInfo statFS(const QString& path)
1222{
1223 FilesystemInfo info;
1224
1225 QStorageInfo storage_info(nearestExistentAncestor(path));
1226
1227 info.fsTypeName = storage_info.fileSystemType();
1228
1229 info.fsType = getFilesystemTypeFuzzy(info.fsTypeName);
1230
1231 info.blockSize = storage_info.blockSize();
1232 info.bytesAvailable = storage_info.bytesAvailable();
1233 info.bytesFree = storage_info.bytesFree();
1234 info.bytesTotal = storage_info.bytesTotal();
1235
1236 info.name = storage_info.name();
1237 info.rootPath = storage_info.rootPath();
1238
1239 return info;
1240}
1241
1242/**
1243 * @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