Commit Graph

23 Commits

Author SHA1 Message Date
李通洲 f93ffed57a Disk: fix Windows quota affecting free space and unify disk size calculation
- Windows: use FILE_FS_FULL_SIZE_INFORMATION_EX on Windows 10 1809+ (Build >= 17763) when calcType != AVAILABLE to get ActualTotalAllocationUnits/ActualAvailableAllocationUnits (ignoring per-user disk quotas). Fall back to legacy FILE_FS_FULL_SIZE_INFORMATION with CallerAvailableAllocationUnits when calcType is AVAILABLE or EX is unavailable.
- Unix-like: respect --disk-calc-type. Use f_bfree for FREE, f_bavail for AVAILABLE (Linux/BSD/SunOS). Haiku currently always uses free_blocks.
- Refactor FFDisk: remove bytesUsed and bytesAvailable; compute used = total - free in disk module.
- Disk module: update custom format (remove `size-available`, add `bytes-used` and `bytes-total`); update JSON output (remove `bytes.available`, `bytes.used`).
- Disk detection: stop computing used in common path; let each platform set bytesFree by chosen semantics.

Fixes #2651
2026-10-13 15:35:12 +08:00
李通洲 ba18705d2e Global: replaces NULL to nullptr 2026-07-10 18:10:09 +08:00
李通洲 abc6c0593c Chore: IndentPPDirectives: BeforeHash [ci skip] 2026-04-15 16:17:08 +08:00
李通洲 c7ecc33b64 Global: removes FFlist::elementSize
Improves performance of module Sound and PhysicalMemory
2026-04-14 15:47:26 +08:00
李通洲 e0eba8ce21 Chore: run clang-format
```bash
find . -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) ! -path "src/3rdparty/*" -print0 | xargs -0 clang-format -i
```
2026-03-29 10:03:32 +08:00
李通洲 645bf5c839 Disk: moves disk hiding by folder and FS type to detection code
Don't probe if hided

Fixes #2043
2025-11-06 13:39:30 +08:00
李通洲 57a4b9b6ed Disk: refactors mountpoint matching to use shared string utilities 2025-09-19 14:54:13 +08:00
李通洲 f0e9caaf04 Disk: allows array input for disk folder and filesystem options 2025-09-18 14:51:00 +08:00
Carter Li a0f579072f Disk: add --disk-hide-fs
Fix #1762
2025-05-21 16:40:42 +08:00
Carter Li d439ce8eb5 Disk: rename hiddenFolder to hideFolder; add docs 2025-05-21 15:09:19 +08:00
李通洲 8eb8f710d0 Disk: add option --disk-hidden-folders 2025-05-19 18:32:56 +08:00
李通洲 367264e549 Disk: only detect folders that specified by --disk-folders
Can be used to improve performance by ignoring network disks
2024-04-30 15:42:44 +08:00
李通洲 1058e876a7 Revert "Disk (Windows): add --disk-ignore-remote"
This reverts commit c71b04ba93.
2024-04-30 14:46:26 +08:00
李通洲 c71b04ba93 Disk (Windows): add --disk-ignore-remote 2024-04-29 23:28:20 +08:00
李通洲 77db2d84a3 FFstrbuf: remove ffStrbufCompAlphabetically 2024-02-22 10:38:33 +08:00
李通洲 7358326a13 Disk: add --disk-use-available
fix #543
2023-08-26 13:43:13 +08:00
李通洲 434a879538 Disk: rename FFDiskType to FFDiskVolumeType 2023-08-26 13:40:40 +08:00
李通洲 d5a3802492 Disk: don't use singleton 2023-06-13 09:04:41 +08:00
李通洲 e13f04e80f Disk: backport changes from config branch 2023-06-08 22:24:57 +08:00
李通洲 3d5ef186ba Disk: don't convert NAN to integer; don't print 0B / 0B (0%)
fix ASAN warning: `runtime error: nan is outside the range of representable values of type 'unsigned char'`
2022-10-18 21:23:29 +08:00
Linus Dierheimer 19a9b18c69 Disk: Linux impl working 2022-10-17 13:19:48 +02:00
李通洲 a7e93faac8 Disk: print if a folder removable; improve performance 2022-10-09 15:37:14 +08:00
李通洲 49921f5ed1 Disk: add support for Windows
Also major refactoring of util/windows/wmi
2022-10-09 15:37:14 +08:00