2011-04-07 17:09:10 +00:00
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package os
|
|
|
|
|
2011-12-03 02:17:34 +00:00
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"syscall"
|
|
|
|
)
|
2011-04-07 17:09:10 +00:00
|
|
|
|
|
|
|
var (
|
2011-12-03 02:17:34 +00:00
|
|
|
Eshortstat = errors.New("stat buffer too small")
|
|
|
|
Ebadstat = errors.New("malformed stat buffer")
|
|
|
|
Ebadfd = errors.New("fd out of range or not open")
|
|
|
|
Ebadarg = errors.New("bad arg in system call")
|
|
|
|
Enotdir = errors.New("not a directory")
|
|
|
|
Enonexist = errors.New("file does not exist")
|
|
|
|
Eexist = errors.New("file already exists")
|
|
|
|
Eio = errors.New("i/o error")
|
|
|
|
Eperm = errors.New("permission denied")
|
2011-04-07 17:09:10 +00:00
|
|
|
|
|
|
|
EINVAL = Ebadarg
|
|
|
|
ENOTDIR = Enotdir
|
|
|
|
ENOENT = Enonexist
|
|
|
|
EEXIST = Eexist
|
|
|
|
EIO = Eio
|
2011-05-20 00:18:15 +00:00
|
|
|
EACCES = Eperm
|
2011-09-16 15:47:21 +00:00
|
|
|
EPERM = Eperm
|
2011-05-20 00:18:15 +00:00
|
|
|
EISDIR = syscall.EISDIR
|
2011-04-07 17:09:10 +00:00
|
|
|
|
2011-12-03 02:17:34 +00:00
|
|
|
EBADF = errors.New("bad file descriptor")
|
|
|
|
ENAMETOOLONG = errors.New("file name too long")
|
|
|
|
ERANGE = errors.New("math result not representable")
|
|
|
|
EPIPE = errors.New("Broken Pipe")
|
|
|
|
EPLAN9 = errors.New("not supported by plan 9")
|
2011-04-07 17:09:10 +00:00
|
|
|
)
|