1 // Copyright 2019 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. 4 5 // Package oserror defines errors values used in the os package. 6 // 7 // These types are defined here to permit the syscall package to reference them. 8 package oserror 9 10 import "errors" 11 12 var ( 13 ErrInvalid = errors.New("invalid argument") 14 ErrPermission = errors.New("permission denied") 15 ErrExist = errors.New("file already exists") 16 ErrNotExist = errors.New("file does not exist") 17 ErrClosed = errors.New("file already closed") 18 ) 19