1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 /* Commented out until gccgo has example support.
15 fmt.Println(path.Base("/a/b"))
16 fmt.Println(path.Base("/"))
17 fmt.Println(path.Base(""))
35 for _, p := range paths {
36 fmt.Printf("Clean(%q) = %q\n", p, path.Clean(p))
40 // Clean("a/c") = "a/c"
41 // Clean("a//c") = "a/c"
42 // Clean("a/c/.") = "a/c"
43 // Clean("a/c/b/..") = "a/c"
44 // Clean("/../a/c") = "/a/c"
45 // Clean("/../a/b/../././/c") = "/a/c"
50 fmt.Println(path.Dir("/a/b/c"))
51 fmt.Println(path.Dir("a/b/c"))
52 fmt.Println(path.Dir("/"))
53 fmt.Println(path.Dir(""))
62 fmt.Println(path.Ext("/a/b/c/bar.css"))
63 fmt.Println(path.Ext("/"))
64 fmt.Println(path.Ext(""))
72 fmt.Println(path.IsAbs("/dev/null"))
77 fmt.Println(path.Join("a", "b", "c"))
78 fmt.Println(path.Join("a", "b/c"))
79 fmt.Println(path.Join("a/b", "c"))
80 fmt.Println(path.Join("", ""))
81 fmt.Println(path.Join("a", ""))
82 fmt.Println(path.Join("", "a"))
93 fmt.Println(path.Split("static/myfile.css"))
94 fmt.Println(path.Split("myfile.css"))
95 fmt.Println(path.Split(""))