* @brief colect information about the filesystem under a file * */
| 1219 | * |
| 1220 | */ |
| 1221 | FilesystemInfo 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 |
no test coverage detected