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 7package filelock 8 9import ( 10 "errors" 11 "io/fs" 12) 13 14type lockType int8 15 16const ( 17 readLock = iota + 1 18 writeLock 19) 20 21func 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 29func unlock(f File) error { 30 return &fs.PathError{ 31 Op: "Unlock", 32 Path: f.Name(), 33 Err: errors.ErrUnsupported, 34 } 35} 36