ohmu
·
2026-10-15
1#pragma once
2
3#include "fastfetch.h"
4#include "modules/disk/option.h"
5
6#ifdef _WIN32
7 #define FF_DISK_FOLDER_SEPARATOR ';'
8#else
9 #define FF_DISK_FOLDER_SEPARATOR ':'
10#endif
11
12typedef struct FFDisk {
13 FFstrbuf mountFrom;
14 FFstrbuf mountpoint;
15 FFstrbuf filesystem;
16 FFstrbuf name;
17 FFDiskVolumeType type;
18
19 uint64_t bytesFree;
20 uint64_t bytesTotal;
21
22 uint32_t filesUsed;
23 uint32_t filesTotal;
24
25 uint64_t createTime;
26} FFDisk;
27
28/**
29 * Returns a List of FFDisk, sorted alphabetically by mountpoint.
30 * If error is not set, disks contains at least one disk.
31 */
32const char* ffDetectDisks(FFDiskOptions* options, FFlist* disks /* list of FFDisk */);
33
34const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks);
35
36#ifndef _WIN32
37bool ffDiskMatchesFolderPatterns(FFstrbuf* folders, const char* path, char separator);
38#endif