1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
|
<h1> Package filepath </h1> <ul id="short-nav">
<li><code>import "path/filepath"</code></li>
<li><a href="#pkg-overview" class="overviewLink">Overview</a></li>
<li><a href="#pkg-index" class="indexLink">Index</a></li>
<li><a href="#pkg-examples" class="examplesLink">Examples</a></li>
</ul> <h2 id="pkg-overview">Overview </h2> <p>Package filepath implements utility routines for manipulating filename paths in a way compatible with the target operating system-defined file paths. </p>
<p>The filepath package uses either forward slashes or backslashes, depending on the operating system. To process paths such as URLs that always use forward slashes regardless of the operating system, see the <span>path</span> package. </p> <h2 id="pkg-index">Index </h2> <ul id="manual-nav">
<li><a href="#pkg-constants">Constants</a></li>
<li><a href="#pkg-variables">Variables</a></li>
<li><a href="#Abs">func Abs(path string) (string, error)</a></li>
<li><a href="#Base">func Base(path string) string</a></li>
<li><a href="#Clean">func Clean(path string) string</a></li>
<li><a href="#Dir">func Dir(path string) string</a></li>
<li><a href="#EvalSymlinks">func EvalSymlinks(path string) (string, error)</a></li>
<li><a href="#Ext">func Ext(path string) string</a></li>
<li><a href="#FromSlash">func FromSlash(path string) string</a></li>
<li><a href="#Glob">func Glob(pattern string) (matches []string, err error)</a></li>
<li><a href="#HasPrefix">func HasPrefix(p, prefix string) bool</a></li>
<li><a href="#IsAbs">func IsAbs(path string) bool</a></li>
<li><a href="#IsLocal">func IsLocal(path string) bool</a></li>
<li><a href="#Join">func Join(elem ...string) string</a></li>
<li><a href="#Match">func Match(pattern, name string) (matched bool, err error)</a></li>
<li><a href="#Rel">func Rel(basepath, targpath string) (string, error)</a></li>
<li><a href="#Split">func Split(path string) (dir, file string)</a></li>
<li><a href="#SplitList">func SplitList(path string) []string</a></li>
<li><a href="#ToSlash">func ToSlash(path string) string</a></li>
<li><a href="#VolumeName">func VolumeName(path string) string</a></li>
<li><a href="#Walk">func Walk(root string, fn WalkFunc) error</a></li>
<li><a href="#WalkDir">func WalkDir(root string, fn fs.WalkDirFunc) error</a></li>
<li><a href="#WalkFunc">type WalkFunc</a></li>
</ul> <div id="pkg-examples"> <h3>Examples</h3> <dl> <dd><a class="exampleLink" href="#example_Base">Base</a></dd> <dd><a class="exampleLink" href="#example_Dir">Dir</a></dd> <dd><a class="exampleLink" href="#example_Ext">Ext</a></dd> <dd><a class="exampleLink" href="#example_IsAbs">IsAbs</a></dd> <dd><a class="exampleLink" href="#example_Join">Join</a></dd> <dd><a class="exampleLink" href="#example_Match">Match</a></dd> <dd><a class="exampleLink" href="#example_Rel">Rel</a></dd> <dd><a class="exampleLink" href="#example_Split">Split</a></dd> <dd><a class="exampleLink" href="#example_SplitList">SplitList</a></dd> <dd><a class="exampleLink" href="#example_Walk">Walk</a></dd> </dl> </div> <h3>Package files</h3> <p> <span>match.go</span> <span>path.go</span> <span>path_nonwindows.go</span> <span>path_unix.go</span> <span>symlink.go</span> <span>symlink_unix.go</span> </p> <h2 id="pkg-constants">Constants</h2> <pre data-language="go">const (
Separator = os.PathSeparator
ListSeparator = os.PathListSeparator
)</pre> <h2 id="pkg-variables">Variables</h2> <p>ErrBadPattern indicates a pattern was malformed. </p>
<pre data-language="go">var ErrBadPattern = errors.New("syntax error in pattern")</pre> <p>SkipAll is used as a return value from <a href="#WalkFunc">WalkFunc</a> to indicate that all remaining files and directories are to be skipped. It is not returned as an error by any function. </p>
<pre data-language="go">var SkipAll error = fs.SkipAll</pre> <p>SkipDir is used as a return value from <a href="#WalkFunc">WalkFunc</a> to indicate that the directory named in the call is to be skipped. It is not returned as an error by any function. </p>
<pre data-language="go">var SkipDir error = fs.SkipDir</pre> <h2 id="Abs">func <span>Abs</span> </h2> <pre data-language="go">func Abs(path string) (string, error)</pre> <p>Abs returns an absolute representation of path. If the path is not absolute it will be joined with the current working directory to turn it into an absolute path. The absolute path name for a given file is not guaranteed to be unique. Abs calls <a href="#Clean">Clean</a> on the result. </p>
<h2 id="Base">func <span>Base</span> </h2> <pre data-language="go">func Base(path string) string</pre> <p>Base returns the last element of path. Trailing path separators are removed before extracting the last element. If the path is empty, Base returns ".". If the path consists entirely of separators, Base returns a single separator. </p> <h4 id="example_Base"> <span class="text">Example</span>
</h4> <p>Code:</p> <pre class="code" data-language="go">fmt.Println("On Unix:")
fmt.Println(filepath.Base("/foo/bar/baz.js"))
fmt.Println(filepath.Base("/foo/bar/baz"))
fmt.Println(filepath.Base("/foo/bar/baz/"))
fmt.Println(filepath.Base("dev.txt"))
fmt.Println(filepath.Base("../todo.txt"))
fmt.Println(filepath.Base(".."))
fmt.Println(filepath.Base("."))
fmt.Println(filepath.Base("/"))
fmt.Println(filepath.Base(""))
</pre> <p>Output:</p> <pre class="output" data-language="go">On Unix:
baz.js
baz
baz
dev.txt
todo.txt
..
.
/
.
</pre> <h2 id="Clean">func <span>Clean</span> </h2> <pre data-language="go">func Clean(path string) string</pre> <p>Clean returns the shortest path name equivalent to path by purely lexical processing. It applies the following rules iteratively until no further processing can be done: </p>
<ol> <li>Replace multiple <a href="#Separator">Separator</a> elements with a single one. </li>
<li>Eliminate each . path name element (the current directory). </li>
<li>Eliminate each inner .. path name element (the parent directory) along with the non-.. element that precedes it. </li>
<li>Eliminate .. elements that begin a rooted path: that is, replace "/.." by "/" at the beginning of a path, assuming Separator is '/'. </li>
</ol> <p>The returned path ends in a slash only if it represents a root directory, such as "/" on Unix or `C:\` on Windows. </p>
<p>Finally, any occurrences of slash are replaced by Separator. </p>
<p>If the result of this process is an empty string, Clean returns the string ".". </p>
<p>On Windows, Clean does not modify the volume name other than to replace occurrences of "/" with `\`. For example, Clean("//host/share/../x") returns `\\host\share\x`. </p>
<p>See also Rob Pike, “Lexical File Names in Plan 9 or Getting Dot-Dot Right,” <a href="https://9p.io/sys/doc/lexnames.html">https://9p.io/sys/doc/lexnames.html</a> </p>
<h2 id="Dir">func <span>Dir</span> </h2> <pre data-language="go">func Dir(path string) string</pre> <p>Dir returns all but the last element of path, typically the path's directory. After dropping the final element, Dir calls <a href="#Clean">Clean</a> on the path and trailing slashes are removed. If the path is empty, Dir returns ".". If the path consists entirely of separators, Dir returns a single separator. The returned path does not end in a separator unless it is the root directory. </p> <h4 id="example_Dir"> <span class="text">Example</span>
</h4> <p>Code:</p> <pre class="code" data-language="go">fmt.Println("On Unix:")
fmt.Println(filepath.Dir("/foo/bar/baz.js"))
fmt.Println(filepath.Dir("/foo/bar/baz"))
fmt.Println(filepath.Dir("/foo/bar/baz/"))
fmt.Println(filepath.Dir("/dirty//path///"))
fmt.Println(filepath.Dir("dev.txt"))
fmt.Println(filepath.Dir("../todo.txt"))
fmt.Println(filepath.Dir(".."))
fmt.Println(filepath.Dir("."))
fmt.Println(filepath.Dir("/"))
fmt.Println(filepath.Dir(""))
</pre> <p>Output:</p> <pre class="output" data-language="go">On Unix:
/foo/bar
/foo/bar
/foo/bar/baz
/dirty/path
.
..
.
.
/
.
</pre> <h2 id="EvalSymlinks">func <span>EvalSymlinks</span> </h2> <pre data-language="go">func EvalSymlinks(path string) (string, error)</pre> <p>EvalSymlinks returns the path name after the evaluation of any symbolic links. If path is relative the result will be relative to the current directory, unless one of the components is an absolute symbolic link. EvalSymlinks calls <a href="#Clean">Clean</a> on the result. </p>
<h2 id="Ext">func <span>Ext</span> </h2> <pre data-language="go">func Ext(path string) string</pre> <p>Ext returns the file name extension used by path. The extension is the suffix beginning at the final dot in the final element of path; it is empty if there is no dot. </p> <h4 id="example_Ext"> <span class="text">Example</span>
</h4> <p>Code:</p> <pre class="code" data-language="go">fmt.Printf("No dots: %q\n", filepath.Ext("index"))
fmt.Printf("One dot: %q\n", filepath.Ext("index.js"))
fmt.Printf("Two dots: %q\n", filepath.Ext("main.test.js"))
</pre> <p>Output:</p> <pre class="output" data-language="go">No dots: ""
One dot: ".js"
Two dots: ".js"
</pre> <h2 id="FromSlash">func <span>FromSlash</span> </h2> <pre data-language="go">func FromSlash(path string) string</pre> <p>FromSlash returns the result of replacing each slash ('/') character in path with a separator character. Multiple slashes are replaced by multiple separators. </p>
<h2 id="Glob">func <span>Glob</span> </h2> <pre data-language="go">func Glob(pattern string) (matches []string, err error)</pre> <p>Glob returns the names of all files matching pattern or nil if there is no matching file. The syntax of patterns is the same as in <a href="#Match">Match</a>. The pattern may describe hierarchical names such as /usr/*/bin/ed (assuming the <a href="#Separator">Separator</a> is '/'). </p>
<p>Glob ignores file system errors such as I/O errors reading directories. The only possible returned error is <a href="#ErrBadPattern">ErrBadPattern</a>, when pattern is malformed. </p>
<h2 id="HasPrefix">func <span>HasPrefix</span> </h2> <pre data-language="go">func HasPrefix(p, prefix string) bool</pre> <p>HasPrefix exists for historical compatibility and should not be used. </p>
<p>Deprecated: HasPrefix does not respect path boundaries and does not ignore case when required. </p>
<h2 id="IsAbs">func <span>IsAbs</span> </h2> <pre data-language="go">func IsAbs(path string) bool</pre> <p>IsAbs reports whether the path is absolute. </p> <h4 id="example_IsAbs"> <span class="text">Example</span>
</h4> <p>Code:</p> <pre class="code" data-language="go">fmt.Println("On Unix:")
fmt.Println(filepath.IsAbs("/home/gopher"))
fmt.Println(filepath.IsAbs(".bashrc"))
fmt.Println(filepath.IsAbs(".."))
fmt.Println(filepath.IsAbs("."))
fmt.Println(filepath.IsAbs("/"))
fmt.Println(filepath.IsAbs(""))
</pre> <p>Output:</p> <pre class="output" data-language="go">On Unix:
true
false
false
false
true
false
</pre> <h2 id="IsLocal">func <span>IsLocal</span> <span title="Added in Go 1.20">1.20</span> </h2> <pre data-language="go">func IsLocal(path string) bool</pre> <p>IsLocal reports whether path, using lexical analysis only, has all of these properties: </p>
<ul> <li>is within the subtree rooted at the directory in which path is evaluated </li>
<li>is not an absolute path </li>
<li>is not empty </li>
<li>on Windows, is not a reserved name such as "NUL" </li>
</ul> <p>If IsLocal(path) returns true, then Join(base, path) will always produce a path contained within base and Clean(path) will always produce an unrooted path with no ".." path elements. </p>
<p>IsLocal is a purely lexical operation. In particular, it does not account for the effect of any symbolic links that may exist in the filesystem. </p>
<h2 id="Join">func <span>Join</span> </h2> <pre data-language="go">func Join(elem ...string) string</pre> <p>Join joins any number of path elements into a single path, separating them with an OS specific <a href="#Separator">Separator</a>. Empty elements are ignored. The result is Cleaned. However, if the argument list is empty or all its elements are empty, Join returns an empty string. On Windows, the result will only be a UNC path if the first non-empty element is a UNC path. </p> <h4 id="example_Join"> <span class="text">Example</span>
</h4> <p>Code:</p> <pre class="code" data-language="go">fmt.Println("On Unix:")
fmt.Println(filepath.Join("a", "b", "c"))
fmt.Println(filepath.Join("a", "b/c"))
fmt.Println(filepath.Join("a/b", "c"))
fmt.Println(filepath.Join("a/b", "/c"))
fmt.Println(filepath.Join("a/b", "../../../xyz"))
</pre> <p>Output:</p> <pre class="output" data-language="go">On Unix:
a/b/c
a/b/c
a/b/c
a/b/c
../xyz
</pre> <h2 id="Match">func <span>Match</span> </h2> <pre data-language="go">func Match(pattern, name string) (matched bool, err error)</pre> <p>Match reports whether name matches the shell file name pattern. The pattern syntax is: </p>
<pre data-language="go">pattern:
{ term }
term:
'*' matches any sequence of non-Separator characters
'?' matches any single non-Separator character
'[' [ '^' ] { character-range } ']'
character class (must be non-empty)
c matches character c (c != '*', '?', '\\', '[')
'\\' c matches character c
character-range:
c matches character c (c != '\\', '-', ']')
'\\' c matches character c
lo '-' hi matches character c for lo <= c <= hi
</pre> <p>Match requires pattern to match all of name, not just a substring. The only possible returned error is <a href="#ErrBadPattern">ErrBadPattern</a>, when pattern is malformed. </p>
<p>On Windows, escaping is disabled. Instead, '\\' is treated as path separator. </p> <h4 id="example_Match"> <span class="text">Example</span>
</h4> <p>Code:</p> <pre class="code" data-language="go">fmt.Println("On Unix:")
fmt.Println(filepath.Match("/home/catch/*", "/home/catch/foo"))
fmt.Println(filepath.Match("/home/catch/*", "/home/catch/foo/bar"))
fmt.Println(filepath.Match("/home/?opher", "/home/gopher"))
fmt.Println(filepath.Match("/home/\\*", "/home/*"))
</pre> <p>Output:</p> <pre class="output" data-language="go">On Unix:
true <nil>
false <nil>
true <nil>
true <nil>
</pre> <h2 id="Rel">func <span>Rel</span> </h2> <pre data-language="go">func Rel(basepath, targpath string) (string, error)</pre> <p>Rel returns a relative path that is lexically equivalent to targpath when joined to basepath with an intervening separator. That is, <a href="#Join">Join</a>(basepath, Rel(basepath, targpath)) is equivalent to targpath itself. On success, the returned path will always be relative to basepath, even if basepath and targpath share no elements. An error is returned if targpath can't be made relative to basepath or if knowing the current working directory would be necessary to compute it. Rel calls <a href="#Clean">Clean</a> on the result. </p> <h4 id="example_Rel"> <span class="text">Example</span>
</h4> <p>Code:</p> <pre class="code" data-language="go">paths := []string{
"/a/b/c",
"/b/c",
"./b/c",
}
base := "/a"
fmt.Println("On Unix:")
for _, p := range paths {
rel, err := filepath.Rel(base, p)
fmt.Printf("%q: %q %v\n", p, rel, err)
}
</pre> <p>Output:</p> <pre class="output" data-language="go">On Unix:
"/a/b/c": "b/c" <nil>
"/b/c": "../b/c" <nil>
"./b/c": "" Rel: can't make ./b/c relative to /a
</pre> <h2 id="Split">func <span>Split</span> </h2> <pre data-language="go">func Split(path string) (dir, file string)</pre> <p>Split splits path immediately following the final <a href="#Separator">Separator</a>, separating it into a directory and file name component. If there is no Separator in path, Split returns an empty dir and file set to path. The returned values have the property that path = dir+file. </p> <h4 id="example_Split"> <span class="text">Example</span>
</h4> <p>Code:</p> <pre class="code" data-language="go">paths := []string{
"/home/arnie/amelia.jpg",
"/mnt/photos/",
"rabbit.jpg",
"/usr/local//go",
}
fmt.Println("On Unix:")
for _, p := range paths {
dir, file := filepath.Split(p)
fmt.Printf("input: %q\n\tdir: %q\n\tfile: %q\n", p, dir, file)
}
</pre> <p>Output:</p> <pre class="output" data-language="go">On Unix:
input: "/home/arnie/amelia.jpg"
dir: "/home/arnie/"
file: "amelia.jpg"
input: "/mnt/photos/"
dir: "/mnt/photos/"
file: ""
input: "rabbit.jpg"
dir: ""
file: "rabbit.jpg"
input: "/usr/local//go"
dir: "/usr/local//"
file: "go"
</pre> <h2 id="SplitList">func <span>SplitList</span> </h2> <pre data-language="go">func SplitList(path string) []string</pre> <p>SplitList splits a list of paths joined by the OS-specific <a href="#ListSeparator">ListSeparator</a>, usually found in PATH or GOPATH environment variables. Unlike strings.Split, SplitList returns an empty slice when passed an empty string. </p> <h4 id="example_SplitList"> <span class="text">Example</span>
</h4> <p>Code:</p> <pre class="code" data-language="go">fmt.Println("On Unix:", filepath.SplitList("/a/b/c:/usr/bin"))
</pre> <p>Output:</p> <pre class="output" data-language="go">On Unix: [/a/b/c /usr/bin]
</pre> <h2 id="ToSlash">func <span>ToSlash</span> </h2> <pre data-language="go">func ToSlash(path string) string</pre> <p>ToSlash returns the result of replacing each separator character in path with a slash ('/') character. Multiple separators are replaced by multiple slashes. </p>
<h2 id="VolumeName">func <span>VolumeName</span> </h2> <pre data-language="go">func VolumeName(path string) string</pre> <p>VolumeName returns leading volume name. Given "C:\foo\bar" it returns "C:" on Windows. Given "\\host\share\foo" it returns "\\host\share". On other platforms it returns "". </p>
<h2 id="Walk">func <span>Walk</span> </h2> <pre data-language="go">func Walk(root string, fn WalkFunc) error</pre> <p>Walk walks the file tree rooted at root, calling fn for each file or directory in the tree, including root. </p>
<p>All errors that arise visiting files and directories are filtered by fn: see the <a href="#WalkFunc">WalkFunc</a> documentation for details. </p>
<p>The files are walked in lexical order, which makes the output deterministic but requires Walk to read an entire directory into memory before proceeding to walk that directory. </p>
<p>Walk does not follow symbolic links. </p>
<p>Walk is less efficient than <a href="#WalkDir">WalkDir</a>, introduced in Go 1.16, which avoids calling os.Lstat on every visited file or directory. </p> <h4 id="example_Walk"> <span class="text">Example</span>
</h4> <p>Code:</p> <pre class="code" data-language="go">package filepath_test
import (
"fmt"
"io/fs"
"os"
"path/filepath"
)
func prepareTestDirTree(tree string) (string, error) {
tmpDir, err := os.MkdirTemp("", "")
if err != nil {
return "", fmt.Errorf("error creating temp directory: %v\n", err)
}
err = os.MkdirAll(filepath.Join(tmpDir, tree), 0755)
if err != nil {
os.RemoveAll(tmpDir)
return "", err
}
return tmpDir, nil
}
func ExampleWalk() {
tmpDir, err := prepareTestDirTree("dir/to/walk/skip")
if err != nil {
fmt.Printf("unable to create test dir tree: %v\n", err)
return
}
defer os.RemoveAll(tmpDir)
os.Chdir(tmpDir)
subDirToSkip := "skip"
fmt.Println("On Unix:")
err = filepath.Walk(".", func(path string, info fs.FileInfo, err error) error {
if err != nil {
fmt.Printf("prevent panic by handling failure accessing a path %q: %v\n", path, err)
return err
}
if info.IsDir() && info.Name() == subDirToSkip {
fmt.Printf("skipping a dir without errors: %+v \n", info.Name())
return filepath.SkipDir
}
fmt.Printf("visited file or dir: %q\n", path)
return nil
})
if err != nil {
fmt.Printf("error walking the path %q: %v\n", tmpDir, err)
return
}
// Output:
// On Unix:
// visited file or dir: "."
// visited file or dir: "dir"
// visited file or dir: "dir/to"
// visited file or dir: "dir/to/walk"
// skipping a dir without errors: skip
}
</pre> <h2 id="WalkDir">func <span>WalkDir</span> <span title="Added in Go 1.16">1.16</span> </h2> <pre data-language="go">func WalkDir(root string, fn fs.WalkDirFunc) error</pre> <p>WalkDir walks the file tree rooted at root, calling fn for each file or directory in the tree, including root. </p>
<p>All errors that arise visiting files and directories are filtered by fn: see the <span>fs.WalkDirFunc</span> documentation for details. </p>
<p>The files are walked in lexical order, which makes the output deterministic but requires WalkDir to read an entire directory into memory before proceeding to walk that directory. </p>
<p>WalkDir does not follow symbolic links. </p>
<p>WalkDir calls fn with paths that use the separator character appropriate for the operating system. This is unlike <span>io/fs.WalkDir</span>, which always uses slash separated paths. </p>
<h2 id="WalkFunc">type <span>WalkFunc</span> </h2> <p>WalkFunc is the type of the function called by <a href="#Walk">Walk</a> to visit each file or directory. </p>
<p>The path argument contains the argument to Walk as a prefix. That is, if Walk is called with root argument "dir" and finds a file named "a" in that directory, the walk function will be called with argument "dir/a". </p>
<p>The directory and file are joined with Join, which may clean the directory name: if Walk is called with the root argument "x/../dir" and finds a file named "a" in that directory, the walk function will be called with argument "dir/a", not "x/../dir/a". </p>
<p>The info argument is the fs.FileInfo for the named path. </p>
<p>The error result returned by the function controls how Walk continues. If the function returns the special value <a href="#SkipDir">SkipDir</a>, Walk skips the current directory (path if info.IsDir() is true, otherwise path's parent directory). If the function returns the special value <a href="#SkipAll">SkipAll</a>, Walk skips all remaining files and directories. Otherwise, if the function returns a non-nil error, Walk stops entirely and returns that error. </p>
<p>The err argument reports an error related to path, signaling that Walk will not walk into that directory. The function can decide how to handle that error; as described earlier, returning the error will cause Walk to stop walking the entire tree. </p>
<p>Walk calls the function with a non-nil err argument in two cases. </p>
<p>First, if an <span>os.Lstat</span> on the root directory or any directory or file in the tree fails, Walk calls the function with path set to that directory or file's path, info set to nil, and err set to the error from os.Lstat. </p>
<p>Second, if a directory's Readdirnames method fails, Walk calls the function with path set to the directory's path, info, set to an <span>fs.FileInfo</span> describing the directory, and err set to the error from Readdirnames. </p>
<pre data-language="go">type WalkFunc func(path string, info fs.FileInfo, err error) error</pre><div class="_attribution">
<p class="_attribution-p">
© Google, Inc.<br>Licensed under the Creative Commons Attribution License 3.0.<br>
<a href="http://golang.org/pkg/path/filepath/" class="_attribution-link">http://golang.org/pkg/path/filepath/</a>
</p>
</div>
|