diff options
author | Shenghou Ma <minux.ma@gmail.com> | 2012-03-14 23:54:40 +0800 |
---|---|---|
committer | Shenghou Ma <minux.ma@gmail.com> | 2012-03-14 23:54:40 +0800 |
commit | a68a242c0236501299d703c74edb202013935981 (patch) | |
tree | fef37c4a6c9d7bff6622c75d42b073fe66691c65 /src/pkg/os/error.go | |
parent | 8265bd30231a03a3f5d3c5725efa2c1e4fbc49d4 (diff) | |
download | go-a68a242c0236501299d703c74edb202013935981.tar.gz |
os: IsNotExist() should also consider ERROR_PATH_NOT_FOUND on Windows
Also update documentation about IsExist() and IsNotExist(), they are not
about files only.
R=rsc
CC=golang-dev
http://codereview.appspot.com/5794073
Diffstat (limited to 'src/pkg/os/error.go')
-rw-r--r-- | src/pkg/os/error.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/os/error.go b/src/pkg/os/error.go index 54c2dc639..b88e49400 100644 --- a/src/pkg/os/error.go +++ b/src/pkg/os/error.go @@ -43,14 +43,14 @@ func NewSyscallError(syscall string, err error) error { return &SyscallError{syscall, err} } -// IsExist returns whether the error is known to report that a file already exists. -// It is satisfied by ErrExist as well as some syscall errors. +// 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 does not exist. -// It is satisfied by ErrNotExist as well as some syscall errors. +// 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) } |