fusego/fuseutil/not_implemented_file_system.go

218 lines
4.9 KiB
Go
Raw Permalink Normal View History

2015-03-25 01:17:58 +03:00
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package fuseutil
import (
"context"
"github.com/jacobsa/fuse"
"github.com/jacobsa/fuse/fuseops"
)
2015-03-25 01:54:12 +03:00
// A FileSystem that responds to all ops with fuse.ENOSYS. Embed this in your
// struct to inherit default implementations for the methods you don't care
// about, ensuring your struct will continue to implement FileSystem even as
// new methods are added.
2015-03-25 01:17:58 +03:00
type NotImplementedFileSystem struct {
}
var _ FileSystem = &NotImplementedFileSystem{}
2015-09-09 02:47:48 +03:00
func (fs *NotImplementedFileSystem) StatFS(
ctx context.Context,
op *fuseops.StatFSOp) error {
return fuse.ENOSYS
2015-09-09 02:47:48 +03:00
}
func (fs *NotImplementedFileSystem) LookUpInode(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.LookUpInodeOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) GetInodeAttributes(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.GetInodeAttributesOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) SetInodeAttributes(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.SetInodeAttributesOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) ForgetInode(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.ForgetInodeOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) BatchForget(
ctx context.Context,
op *fuseops.BatchForgetOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) MkDir(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.MkDirOp) error {
return fuse.ENOSYS
}
2015-12-15 02:35:40 +03:00
func (fs *NotImplementedFileSystem) MkNode(
ctx context.Context,
op *fuseops.MkNodeOp) error {
return fuse.ENOSYS
2015-12-15 02:35:40 +03:00
}
func (fs *NotImplementedFileSystem) CreateFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.CreateFileOp) error {
return fuse.ENOSYS
}
2015-05-19 08:33:19 +03:00
func (fs *NotImplementedFileSystem) CreateSymlink(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.CreateSymlinkOp) error {
return fuse.ENOSYS
2015-05-19 08:33:19 +03:00
}
2017-11-24 14:44:41 +03:00
func (fs *NotImplementedFileSystem) CreateLink(
ctx context.Context,
op *fuseops.CreateLinkOp) error {
return fuse.ENOSYS
2017-11-24 14:44:41 +03:00
}
2015-06-25 08:37:37 +03:00
func (fs *NotImplementedFileSystem) Rename(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.RenameOp) error {
return fuse.ENOSYS
2015-06-25 08:37:37 +03:00
}
func (fs *NotImplementedFileSystem) RmDir(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.RmDirOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) Unlink(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.UnlinkOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) OpenDir(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.OpenDirOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) ReadDir(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.ReadDirOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) ReleaseDirHandle(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.ReleaseDirHandleOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) OpenFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.OpenFileOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) ReadFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.ReadFileOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) WriteFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.WriteFileOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) SyncFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.SyncFileOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) FlushFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.FlushFileOp) error {
return fuse.ENOSYS
}
func (fs *NotImplementedFileSystem) ReleaseFileHandle(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.ReleaseFileHandleOp) error {
return fuse.ENOSYS
}
2015-05-19 09:06:57 +03:00
func (fs *NotImplementedFileSystem) ReadSymlink(
2015-07-27 08:15:07 +03:00
ctx context.Context,
op *fuseops.ReadSymlinkOp) error {
return fuse.ENOSYS
2015-05-19 09:06:57 +03:00
}
2015-06-05 06:51:45 +03:00
2015-12-04 23:26:49 +03:00
func (fs *NotImplementedFileSystem) RemoveXattr(
ctx context.Context,
op *fuseops.RemoveXattrOp) error {
return fuse.ENOSYS
2015-12-04 23:26:49 +03:00
}
2015-12-10 23:58:46 +03:00
func (fs *NotImplementedFileSystem) GetXattr(
ctx context.Context,
op *fuseops.GetXattrOp) error {
return fuse.ENOSYS
2015-12-10 23:58:46 +03:00
}
func (fs *NotImplementedFileSystem) ListXattr(
ctx context.Context,
op *fuseops.ListXattrOp) error {
return fuse.ENOSYS
2015-12-10 23:58:46 +03:00
}
2017-03-06 06:40:50 +03:00
func (fs *NotImplementedFileSystem) SetXattr(
ctx context.Context,
op *fuseops.SetXattrOp) error {
return fuse.ENOSYS
2017-03-06 06:40:50 +03:00
}
func (fs *NotImplementedFileSystem) Fallocate(
ctx context.Context,
op *fuseops.FallocateOp) error {
return fuse.ENOSYS
}
2023-03-22 18:46:22 +03:00
func (fs *NotImplementedFileSystem) Poll(
ctx context.Context,
op *fuseops.PollOp) error {
return fuse.ENOSYS
}
2023-03-23 00:30:11 +03:00
func (fs *NotImplementedFileSystem) SetConnection(*fuse.Connection) {
}
2015-06-05 06:51:45 +03:00
func (fs *NotImplementedFileSystem) Destroy() {
}