aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/os/error.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-03-30 22:09:55 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-03-30 22:09:55 +0000
commit9a18821cfc7169ea9f4d0bb661e7c4ea362e993d (patch)
tree26322d11da7cc220190e0b8430565ea207eb3eab /libgo/go/os/error.go
parent57c7433fdc3fcb7b0cfd7b13bd11360a5e17c624 (diff)
downloadgcc-9a18821cfc7169ea9f4d0bb661e7c4ea362e993d.zip
gcc-9a18821cfc7169ea9f4d0bb661e7c4ea362e993d.tar.gz
gcc-9a18821cfc7169ea9f4d0bb661e7c4ea362e993d.tar.bz2
libgo: Update to weekly.2012-03-22.
From-SVN: r186026
Diffstat (limited to 'libgo/go/os/error.go')
-rw-r--r--libgo/go/os/error.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/libgo/go/os/error.go b/libgo/go/os/error.go
index e0b83b5..b88e494 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)
+}