From 75cd0c848ff1a57a6fa90b79eef180e7a33b0a42 Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 30 Mar 2012 22:09:55 +0000 Subject: libgo: Update to weekly.2012-03-22. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186026 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgo/go/os/error.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'libgo/go/os/error.go') diff --git a/libgo/go/os/error.go b/libgo/go/os/error.go index e0b83b5c22c..b88e49400de 100644 --- a/libgo/go/os/error.go +++ b/libgo/go/os/error.go @@ -42,3 +42,21 @@ func NewSyscallError(syscall string, err error) error { } return &SyscallError{syscall, err} } + +// IsExist returns whether the error is known to report that a file or directory +// already exists. It is satisfied by ErrExist as well as some syscall errors. +func IsExist(err error) bool { + return isExist(err) +} + +// IsNotExist returns whether the error is known to report that a file or directory +// does not exist. It is satisfied by ErrNotExist as well as some syscall errors. +func IsNotExist(err error) bool { + return isNotExist(err) +} + +// 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 { + return isPermission(err) +} -- cgit v1.2.1