1 // Copyright 2022 The Kubernetes Authors. 2 // SPDX-License-Identifier: Apache-2.0 3 4 package filesys 5 6 import ( 7 "path/filepath" 8 9 "golang.org/x/sys/windows" 10 ) 11 12 func getOSRoot() (string, error) { 13 sysDir, err := windows.GetSystemDirectory() 14 if err != nil { 15 return "", err 16 } 17 return filepath.VolumeName(sysDir) + `\`, nil 18 } 19