static.go 312 B

123456789101112131415161718
  1. package storage
  2. import (
  3. du "github.com/ricochet2200/go-disk-usage/du"
  4. )
  5. /*
  6. File for putting return structs
  7. */
  8. func GetDriveCapacity(drive string) (uint64, uint64, uint64){
  9. usage := du.NewDiskUsage(drive)
  10. free := usage.Free();
  11. total := usage.Size();
  12. avi := usage.Available();
  13. return free, total, avi
  14. }