github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/pkg/util/utils_windows.go (about) 1 //go:build windows 2 // +build windows 3 4 package util 5 6 import ( 7 "path/filepath" 8 9 "github.com/containers/storage/pkg/homedir" 10 "github.com/pkg/errors" 11 ) 12 13 var errNotImplemented = errors.New("not yet implemented") 14 15 // IsCgroup2UnifiedMode returns whether we are running in cgroup 2 unified mode. 16 func IsCgroup2UnifiedMode() (bool, error) { 17 return false, errors.Wrap(errNotImplemented, "IsCgroup2Unified") 18 } 19 20 // GetContainerPidInformationDescriptors returns a string slice of all supported 21 // format descriptors of GetContainerPidInformation. 22 func GetContainerPidInformationDescriptors() ([]string, error) { 23 return nil, errors.Wrap(errNotImplemented, "GetContainerPidInformationDescriptors") 24 } 25 26 // GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for 27 // the pause process 28 func GetRootlessPauseProcessPidPath() (string, error) { 29 return "", errors.Wrap(errNotImplemented, "GetRootlessPauseProcessPidPath") 30 } 31 32 // GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for 33 // the pause process 34 func GetRootlessPauseProcessPidPathGivenDir(unused string) (string, error) { 35 return "", errors.Wrap(errNotImplemented, "GetRootlessPauseProcessPidPath") 36 } 37 38 // GetRuntimeDir returns the runtime directory 39 func GetRuntimeDir() (string, error) { 40 data, err := homedir.GetDataHome() 41 if err != nil { 42 return "", err 43 } 44 runtimeDir := filepath.Join(data, "containers", "podman") 45 return runtimeDir, nil 46 } 47 48 // GetRootlessConfigHomeDir returns the config home directory when running as non root 49 func GetRootlessConfigHomeDir() (string, error) { 50 return "", errors.New("this function is not implemented for windows") 51 }