1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
11 func isExist(err error
) bool {
12 switch pe
:= err
.(type) {
22 return err
== syscall
.EEXIST || err
== syscall
.ENOTEMPTY || err
== ErrExist
25 func isNotExist(err error
) bool {
26 switch pe
:= err
.(type) {
36 return err
== syscall
.ENOENT || err
== ErrNotExist
39 func isPermission(err error
) bool {
40 switch pe
:= err
.(type) {
50 return err
== syscall
.EACCES || err
== syscall
.EPERM || err
== ErrPermission