{"modulePath":"github.com/cockroachdb/errors","version":"v1.14.0","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package oserror\n\n## Variables\n\n```go\nvar (\n\tErrInvalid    = os.ErrInvalid\n\tErrPermission = os.ErrPermission\n\tErrExist      = os.ErrExist\n\tErrNotExist   = os.ErrNotExist\n\tErrClosed     = os.ErrClosed\n)\n```\nPortable analogs of some common system call errors.\n\nErrors returned from this package may be tested against these errors with errors.Is.\n\n## Functions\n\n```go\nfunc IsExist(err error) bool\n```\nIsExist returns a boolean indicating 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.\n\nThis function differs from os.IsExist() in that it can identify an error through wrapping layers.\n\n```go\nfunc IsNotExist(err error) bool\n```\nIsNotExist returns a boolean indicating 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.\n\nThis function differs from os.IsNotExist() in that it can identify an error through wrapping layers.\n\n```go\nfunc IsPermission(err error) bool\n```\nIsPermission returns a boolean indicating whether the error is known to report that permission is denied. It is satisfied by ErrPermission as well as some syscall errors.\n\nThis function differs from os.IsPermission() in that it can identify an error through wrapping layers.\n\n```go\nfunc IsTimeout(err error) bool\n```\nIsTimeout returns a boolean indicating whether the error is known to report that a timeout occurred.\n\nThis function differs from os.IsTimeout() in that it can identify an error through wrapping layers.\n\n","path":"github.com/cockroachdb/errors/oserror","name":"oserror","synopsis":"","isRedistributable":true}
