github.com/enetx/g@v1.0.80/internal/filelock/filelock_other.go (about) 1 // Copyright 2018 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 //go:build !unix && !windows 6 7 package filelock 8 9 import ( 10 "errors" 11 "io/fs" 12 ) 13 14 type lockType int8 15 16 const ( 17 readLock = iota + 1 18 writeLock 19 ) 20 21 func lock(f File, lt lockType) error { 22 return &fs.PathError{ 23 Op: lt.String(), 24 Path: f.Name(), 25 Err: errors.ErrUnsupported, 26 } 27 } 28 29 func unlock(f File) error { 30 return &fs.PathError{ 31 Op: "Unlock", 32 Path: f.Name(), 33 Err: errors.ErrUnsupported, 34 } 35 }