...

Source file src/sigs.k8s.io/kustomize/kyaml/filesys/fsondisk_windows.go

Documentation: sigs.k8s.io/kustomize/kyaml/filesys

     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  

View as plain text