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

39 lines
862 B
C
Raw Normal View History

#pragma once
#include "fastfetch.h"
#include "modules/disk/option.h"
#ifdef _WIN32
#define FF_DISK_FOLDER_SEPARATOR ';'
#else
#define FF_DISK_FOLDER_SEPARATOR ':'
#endif
2026-03-29 09:28:49 +08:00
typedef struct FFDisk {
2023-09-17 20:08:46 +08:00
FFstrbuf mountFrom;
2022-10-17 13:19:48 +02:00
FFstrbuf mountpoint;
FFstrbuf filesystem;
2022-10-18 18:39:28 +08:00
FFstrbuf name;
2023-08-26 09:32:19 +08:00
FFDiskVolumeType type;
2022-10-17 13:19:48 +02:00
2023-08-26 10:36:00 +08:00
uint64_t bytesFree;
2022-10-17 13:19:48 +02:00
uint64_t bytesTotal;
uint32_t filesUsed;
uint32_t filesTotal;
2024-04-09 15:15:33 +08:00
uint64_t createTime;
2022-10-17 13:19:48 +02:00
} FFDisk;
/**
* Returns a List of FFDisk, sorted alphabetically by mountpoint.
* If error is not set, disks contains at least one disk.
*/
const char* ffDetectDisks(FFDiskOptions* options, FFlist* disks /* list of FFDisk */);
const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks);
#ifndef _WIN32
bool ffDiskMatchesFolderPatterns(FFstrbuf* folders, const char* path, char separator);
#endif