Files
fastfetch/src/detection/disk/disk.h
T

46 lines
833 B
C
Raw Normal View History

#pragma once
#ifndef FF_INCLUDED_detection_disk_disk
#define FF_INCLUDED_detection_disk_disk
#include "fastfetch.h"
2022-10-17 13:19:48 +02:00
typedef enum FFDiskType
{
FF_DISK_TYPE_REGULAR,
FF_DISK_TYPE_HIDDEN,
FF_DISK_TYPE_EXTERNAL
} FFDiskType;
typedef struct FFDisk
{
FFstrbuf mountpoint;
FFstrbuf filesystem;
2022-10-18 18:39:28 +08:00
FFstrbuf name;
2022-10-17 13:19:48 +02:00
FFDiskType type;
uint64_t bytesUsed;
uint64_t bytesTotal;
uint8_t bytesPercentage;
uint32_t filesUsed;
uint32_t filesTotal;
uint8_t filesPercentage;
} FFDisk;
2022-10-06 22:56:56 +08:00
typedef struct FFDiskResult
{
FFstrbuf error;
2022-10-17 13:19:48 +02:00
FFlist disks; //List of FFDisk
2022-10-06 22:56:56 +08:00
} FFDiskResult;
2022-10-17 13:19:48 +02:00
/**
* Returns a List of FFDisk, sorted alphabetically by mountpoint.
* If error is not set, disks contains at least one disk.
*
* @return const FFDiskResult*
*/
const FFDiskResult* ffDetectDisks();
#endif