2008-09-11 14:03:46 -06:00
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package os
|
|
|
|
|
2009-06-25 21:24:55 -06:00
|
|
|
// PathError records an error and the operation and file path that caused it.
|
|
|
|
type PathError struct {
|
2011-11-01 19:49:08 -06:00
|
|
|
Op string
|
|
|
|
Path string
|
|
|
|
Err error
|
2009-06-25 21:24:55 -06:00
|
|
|
}
|
|
|
|
|
2011-11-01 19:49:08 -06:00
|
|
|
func (e *PathError) Error() string { return e.Op + " " + e.Path + ": " + e.Err.Error() }
|