// CheckPath checks if the specified path exists
CheckPath checks if the specified path exists
// CheckPath checks if the specified path exists
func (s session) CheckPath(path string) error {
	stdout, err := s.session.Execute(fmt.Sprintf("Test-Path -Path '%s'", path))
	if strings.HasPrefix(string(stdout), "False") {
		return fmt.Errorf("no such path: %s", path)
	}
	return err
}
func ( s session ) CheckPath ( path string ) error { stdout , err := s . session . Execute ( fmt . Sprintf ( " " , path ) ) if strings . HasPrefix ( string ( stdout ) , " " ) { return fmt . Errorf ( " " , path ) } return err }
CheckPath checks if the specified path exists
CheckPath checks if the specified path exists