Files
podman/pkg/specgen/winpath_windows.go
Jason T. Greene b0d36f6351 Implements Windows volume/mount support
Based on WSL2 9p support: remaps windows paths to /mnt/<drive> locations for
both podman and Docker API clients.

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-04-25 13:52:27 -05:00

31 lines
508 B
Go

package specgen
import (
"github.com/sirupsen/logrus"
"os"
"path/filepath"
)
func shouldResolveUnixWinVariant(path string) bool {
return true
}
func shouldResolveWinPaths() bool {
return true
}
func resolveRelativeOnWindows(path string) string {
ret, err := filepath.Abs(path)
if err != nil {
logrus.Debugf("problem resolving possible relative path %q: %s", path, err.Error())
return path
}
return ret
}
func winPathExists(path string) bool {
_, err := os.Stat(path)
return err == nil
}