diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-11-21 07:03:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-11-21 07:03:38 +0000 |
commit | fabcaa8df3d6eb852b87821ef090d31d222870b7 (patch) | |
tree | 72455aea0286937aa08cc141e5efc800e4626577 /libgo/go/path | |
parent | a51fb17f48428e7cfc96a72a9f9f87901363bb6b (diff) | |
download | gcc-fabcaa8df3d6eb852b87821ef090d31d222870b7.zip gcc-fabcaa8df3d6eb852b87821ef090d31d222870b7.tar.gz gcc-fabcaa8df3d6eb852b87821ef090d31d222870b7.tar.bz2 |
libgo: Update to current version of master library.
From-SVN: r193688
Diffstat (limited to 'libgo/go/path')
-rw-r--r-- | libgo/go/path/filepath/path.go | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/libgo/go/path/filepath/path.go b/libgo/go/path/filepath/path.go index bb27f1c..bbd738d 100644 --- a/libgo/go/path/filepath/path.go +++ b/libgo/go/path/filepath/path.go @@ -325,13 +325,18 @@ func Rel(basepath, targpath string) (string, error) { var SkipDir = errors.New("skip this directory") // WalkFunc is the type of the function called for each file or directory -// visited by Walk. If there was a problem walking to the file or directory -// named by path, the incoming error will describe the problem and the -// function can decide how to handle that error (and Walk will not descend -// into that directory). If an error is returned, processing stops. The -// sole exception is that if path is a directory and the function returns the -// special value SkipDir, the contents of the directory are skipped -// and processing continues as usual on the next file. +// visited by Walk. The path argument contains the argument to Walk as a +// prefix; that is, if Walk is called with "dir", which is a directory +// containing the file "a", the walk function will be called with argument +// "dir/a". The info argument is the os.FileInfo for the named path. +// +// If there was a problem walking to the file or directory named by path, the +// incoming error will describe the problem and the function can decide how +// to handle that error (and Walk will not descend into that directory). If +// an error is returned, processing stops. The sole exception is that if path +// is a directory and the function returns the special value SkipDir, the +// contents of the directory are skipped and processing continues as usual on +// the next file. type WalkFunc func(path string, info os.FileInfo, err error) error // walk recursively descends path, calling w. @@ -452,7 +457,7 @@ func Dir(path string) string { return vol + dir } -// VolumeName returns leading volume name. +// VolumeName returns leading volume name. // Given "C:\foo\bar" it returns "C:" under windows. // Given "\\host\share\foo" it returns "\\host\share". // On other platforms it returns "". |