@@ -334,19 +334,20 @@ func Rel(basepath, targpath string) (string, error) {
334
334
var SkipDir = errors .New ("skip this directory" )
335
335
336
336
// WalkFunc is the type of the function called for each file or directory
337
- // visited by Walk. The path argument contains the argument to Walk as a
338
- // prefix; that is, if Walk is called with "dir", which is a directory
339
- // containing the file "a", the walk function will be called with argument
340
- // "dir/a". The info argument is the os.FileInfo for the named path.
337
+ // visited by Walk. The path argument contains the argument to Walk as a prefix;
338
+ // that is, if Walk is called with "dir", which is a directory containing the
339
+ // file "a", the walk function will be called with argument "dir/a". The info
340
+ // argument is the os.FileInfo for the named path.
341
341
//
342
342
// If there was a problem walking to the file or directory named by path, the
343
- // incoming error will describe the problem and the function can decide how
344
- // to handle that error (and Walk will not descend into that directory). If
345
- // an error is returned, processing stops. The sole exception is when the function
346
- // returns the special value SkipDir. If the function returns SkipDir when invoked
347
- // on a directory, Walk skips the directory's contents entirely.
348
- // If the function returns SkipDir when invoked on a non-directory file,
349
- // Walk skips the remaining files in the containing directory.
343
+ // incoming error will describe the problem and the function can decide how to
344
+ // handle that error (and Walk will not descend into that directory). In the
345
+ // case of an error, the info argument may be nil. If an error is returned,
346
+ // processing stops. The sole exception is when the function returns the special
347
+ // value SkipDir. If the function returns SkipDir when invoked on a directory,
348
+ // Walk skips the directory's contents entirely. If the function returns SkipDir
349
+ // when invoked on a non-directory file, Walk skips the remaining files in the
350
+ // containing directory.
350
351
type WalkFunc func (path string , info os.FileInfo , err error ) error
351
352
352
353
var lstat = os .Lstat // for testing
0 commit comments