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// +build plan9 6 7package filelock 8 9import ( 10 "os" 11) 12 13type lockType int8 14 15const ( 16 readLock = iota + 1 17 writeLock 18) 19 20func lock(f File, lt lockType) error { 21 return &os.PathError{ 22 Op: lt.String(), 23 Path: f.Name(), 24 Err: ErrNotSupported, 25 } 26} 27 28func unlock(f File) error { 29 return &os.PathError{ 30 Op: "Unlock", 31 Path: f.Name(), 32 Err: ErrNotSupported, 33 } 34} 35 36func isNotSupported(err error) bool { 37 return err == ErrNotSupported 38} 39