summaryrefslogtreecommitdiffstats
path: root/src/detection/disk/disk.h
diff options
context:
space:
mode:
authorsumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
committersumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
commit76424950e373d3b04ac3dd13019151bfba3e8423 (patch)
tree4c3cfdbda039e592b9186be3e28f8d7cfd439e8a /src/detection/disk/disk.h
Add the files
Diffstat (limited to 'src/detection/disk/disk.h')
-rw-r--r--src/detection/disk/disk.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/detection/disk/disk.h b/src/detection/disk/disk.h
new file mode 100644
index 0000000..57aaf2f
--- /dev/null
+++ b/src/detection/disk/disk.h
@@ -0,0 +1,40 @@
+#pragma once
+
+#include "fastfetch.h"
+#include "modules/disk/option.h"
+
+#ifdef _WIN32
+ #define FF_DISK_FOLDER_SEPARATOR ';'
+#else
+ #define FF_DISK_FOLDER_SEPARATOR ':'
+#endif
+
+typedef struct FFDisk {
+ FFstrbuf mountFrom;
+ FFstrbuf mountpoint;
+ FFstrbuf filesystem;
+ FFstrbuf name;
+ FFDiskVolumeType type;
+
+ uint64_t bytesUsed;
+ uint64_t bytesFree;
+ uint64_t bytesAvailable;
+ uint64_t bytesTotal;
+
+ uint32_t filesUsed;
+ uint32_t filesTotal;
+
+ uint64_t createTime;
+} 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