aboutsummaryrefslogtreecommitdiff
path: root/internal/lockedfile/internal/filelock/filelock_plan9.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/lockedfile/internal/filelock/filelock_plan9.go')
-rw-r--r--internal/lockedfile/internal/filelock/filelock_plan9.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/internal/lockedfile/internal/filelock/filelock_plan9.go b/internal/lockedfile/internal/filelock/filelock_plan9.go
new file mode 100644
index 000000000..908afb6c8
--- /dev/null
+++ b/internal/lockedfile/internal/filelock/filelock_plan9.go
@@ -0,0 +1,37 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build plan9
+// +build plan9
+
+package filelock
+
+import "io/fs"
+
+type lockType int8
+
+const (
+ readLock = iota + 1
+ writeLock
+)
+
+func lock(f File, lt lockType) error {
+ return &fs.PathError{
+ Op: lt.String(),
+ Path: f.Name(),
+ Err: ErrNotSupported,
+ }
+}
+
+func unlock(f File) error {
+ return &fs.PathError{
+ Op: "Unlock",
+ Path: f.Name(),
+ Err: ErrNotSupported,
+ }
+}
+
+func isNotSupported(err error) bool {
+ return err == ErrNotSupported
+}