1 // Copyright 2012 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.
9 func isExist(err error) bool {
10 if pe, ok := err.(*PathError); ok {
13 return err == syscall.ERROR_ALREADY_EXISTS ||
14 err == syscall.ERROR_FILE_EXISTS || err == ErrExist
17 func isNotExist(err error) bool {
18 if pe, ok := err.(*PathError); ok {
21 return err == syscall.ERROR_FILE_NOT_FOUND ||
22 err == syscall.ERROR_PATH_NOT_FOUND || err == ErrNotExist
25 func isPermission(err error) bool {
26 if pe, ok := err.(*PathError); ok {
29 return err == syscall.ERROR_ACCESS_DENIED || err == ErrPermission