diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-04-03 11:15:51 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-04-03 11:15:51 -0700 |
commit | c924cab2fd8932bdfb107c4ca7d26128ba56f19e (patch) | |
tree | 0eea6430e211564fc331f66625373ec761837982 /libgo/go/os/error_posix.go | |
parent | 4c15f6d5728cb694d7d954b2c20409fdc0400b9e (diff) | |
parent | 3cef948a814542119083003a3c35a24e036230b6 (diff) | |
download | gcc-hjl/x32/addr32.tar.gz |
Merge remote-tracking branch 'origin/master' into hjl/x32/addr32hjl/x32/addr32
Diffstat (limited to 'libgo/go/os/error_posix.go')
-rw-r--r-- | libgo/go/os/error_posix.go | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libgo/go/os/error_posix.go b/libgo/go/os/error_posix.go index 74b75d11218..1685c1f2132 100644 --- a/libgo/go/os/error_posix.go +++ b/libgo/go/os/error_posix.go @@ -2,33 +2,27 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin freebsd linux netbsd openbsd windows +// +build darwin freebsd linux netbsd openbsd package os import "syscall" -// IsExist returns whether the error is known to report that a file already exists. -// It is satisfied by ErrExist as well as some syscall errors. -func IsExist(err error) bool { +func isExist(err error) bool { if pe, ok := err.(*PathError); ok { err = pe.Err } return err == syscall.EEXIST || err == ErrExist } -// IsNotExist returns whether the error is known to report that a file does not exist. -// It is satisfied by ErrNotExist as well as some syscall errors. -func IsNotExist(err error) bool { +func isNotExist(err error) bool { if pe, ok := err.(*PathError); ok { err = pe.Err } return err == syscall.ENOENT || err == ErrNotExist } -// IsPermission returns whether the error is known to report that permission is denied. -// It is satisfied by ErrPermission as well as some syscall errors. -func IsPermission(err error) bool { +func isPermission(err error) bool { if pe, ok := err.(*PathError); ok { err = pe.Err } |