package host import "strings" // DirectoryVolume identifies the volume containing an existing directory. type DirectoryVolume struct { CanonicalPath string VolumeGUID string DriveLetter string FixedInternal bool IsVolumeRoot bool } func invalidDirectoryPath(dir string) bool { return dir == "" || strings.HasPrefix(strings.ReplaceAll(dir, `\`, "/"), "//") }