func AppendString(p Path, elem ...string) Path {
	return Append(p, ToPaths(elem)...)
}
AppendString appends additional string elements to the end of path.
package path
import (
	"path/filepath"
	"strings"
)
type Path []string
func New(s string) Path {
	s = filepath.ToSlash(filepath.Clean(s))
	switch {
	case s == "", s == ".":
		return nil
	case s == "/":
		return Path{"/"}
	case s[0] == '/':
		return append(Path{"/"}, strings.Split(s[1:], "/")...)
	default:
		return strings.Split(s, "/")
	}
}
func ToPaths(paths []string) []Path {
	split := make([]Path, len(paths))
	for i, p := range paths {
		split[i] = New(p)
	}
	return split
}
func (p Path) LessThan(o Path) bool {
	for i := 0; ; i++ {
		if i >= len(p) {
			return i < len(o)
		} else if i >= len(o) {
			return false
		} else if p[i] != o[i] {
			return p[i] < o[i]
		}
	}
	return false
}
func (p Path) String() string {
	if len(p) == 0 {
		return "."
	}
	return filepath.Join([]string(p)...)
}
func Append(p Path, ps ...Path) Path {
	for _, e := range ps {
		if len(e) > 0 && e[0] == "/" {
			e = e[1:]
		}
		p = append(p, e...)
	}
	return p
}