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 netbsd openbsd
11 func isExist(err error
) bool {
12 switch pe
:= err
.(type) {
20 return err
== syscall
.EEXIST || err
== ErrExist
23 func isNotExist(err error
) bool {
24 switch pe
:= err
.(type) {
32 return err
== syscall
.ENOENT || err
== ErrNotExist
35 func isPermission(err error
) bool {
36 switch pe
:= err
.(type) {
44 return err
== syscall
.EACCES || err
== syscall
.EPERM || err
== ErrPermission