Files
yellowjacket/backend/explore/diskfree_windows.go
T
yonluandClaude Opus 4.8 65048401e8 feat: autotag scoring overhaul, dump-based explore index, and lyrics search
Consolidates in-progress work across autotag, explore, and library:

- autotag: beets/Picard-informed scoring engine — ID-first matching, VA
  handling, recommendation tiers, and a merged distance/rank cascade, with
  an eval harness for regression tracking.
- explore: offline MusicBrainz dump import/incremental refresh replaces the
  legacy tier crawl; index-first local search with fuzzy matching and a
  dedicated ranker; disk-free guards for dump downloads.
- library: artist-credit extraction and matching.
- lyrics: owned-library lyric search (FTS) with LRCLIB backfill.

Also: rewrite README to be user-focused, and migrate upstream to
git.ljones.me/yonlu/yellowjacket.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 12:14:20 -04:00

23 lines
528 B
Go

//go:build windows
package explore
import "golang.org/x/sys/windows"
// diskFreeBytes returns the free bytes available to the current user
// on the volume containing path. ok is false when unknown.
func diskFreeBytes(path string) (free uint64, ok bool) {
p, err := windows.UTF16PtrFromString(path)
if err != nil {
return 0, false
}
var freeToCaller, total, totalFree uint64
if err := windows.GetDiskFreeSpaceEx(p, &freeToCaller, &total, &totalFree); err != nil {
return 0, false
}
return freeToCaller, true
}