github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/kbfs/libfuse/quarantine.go (about) 1 // Copyright 2018 Keybase Inc. All rights reserved. 2 // Use of this source code is governed by a BSD 3 // license that can be found in the LICENSE file. 4 // 5 //go:build !windows 6 // +build !windows 7 8 package libfuse 9 10 import ( 11 "bazil.org/fuse" 12 "bazil.org/fuse/fs" 13 "golang.org/x/net/context" 14 ) 15 16 // XattrHandler is an interface that includes fuse Get/Set/Remove calls for 17 // xattr. 18 type XattrHandler interface { 19 fs.NodeGetxattrer 20 fs.NodeSetxattrer 21 fs.NodeRemovexattrer 22 } 23 24 // NoXattrHandler is a Xattr handler that always returns fuse.ENOTSUP. 25 type NoXattrHandler struct{} 26 27 var _ XattrHandler = NoXattrHandler{} 28 29 // Getxattr implements the fs.NodeGetxattrer interface. 30 func (h NoXattrHandler) Getxattr(context.Context, 31 *fuse.GetxattrRequest, *fuse.GetxattrResponse) error { 32 return fuse.ENOTSUP 33 } 34 35 // Setxattr implements the fs.NodeSetxattrer interface. 36 func (h NoXattrHandler) Setxattr(context.Context, *fuse.SetxattrRequest) error { 37 return fuse.ENOTSUP 38 } 39 40 // Removexattr implements the fs.NodeRemovexattrer interface. 41 func (h NoXattrHandler) Removexattr(context.Context, *fuse.RemovexattrRequest) error { 42 return fuse.ENOTSUP 43 }