fusego/fuseutil/not_implemented_file_system.go

224 lines
4.8 KiB
Go
Raw 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) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) LookUpInode(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.LookUpInodeOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) GetInodeAttributes(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.GetInodeAttributesOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) SetInodeAttributes(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.SetInodeAttributesOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) ForgetInode(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.ForgetInodeOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) MkDir(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.MkDirOp) (err error) {
err = fuse.ENOSYS
return
}
2015-12-15 02:35:40 +03:00
func (fs *NotImplementedFileSystem) MkNode(
ctx context.Context,
op *fuseops.MkNodeOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) CreateFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.CreateFileOp) (err error) {
err = fuse.ENOSYS
return
}
2015-05-19 08:33:19 +03:00
func (fs *NotImplementedFileSystem) CreateSymlink(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.CreateSymlinkOp) (err error) {
err = fuse.ENOSYS
return
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) (err error) {
err = fuse.ENOSYS
return
}
2015-06-25 08:37:37 +03:00
func (fs *NotImplementedFileSystem) Rename(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-25 08:37:37 +03:00
op *fuseops.RenameOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) RmDir(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.RmDirOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) Unlink(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.UnlinkOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) OpenDir(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.OpenDirOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) ReadDir(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.ReadDirOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) ReleaseDirHandle(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.ReleaseDirHandleOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) OpenFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.OpenFileOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) ReadFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.ReadFileOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) WriteFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.WriteFileOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) SyncFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.SyncFileOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) FlushFile(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.FlushFileOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) ReleaseFileHandle(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.ReleaseFileHandleOp) (err error) {
err = fuse.ENOSYS
return
}
2015-05-19 09:06:57 +03:00
func (fs *NotImplementedFileSystem) ReadSymlink(
2015-07-27 08:15:07 +03:00
ctx context.Context,
2015-06-05 07:14:49 +03:00
op *fuseops.ReadSymlinkOp) (err error) {
err = fuse.ENOSYS
return
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) (err error) {
err = fuse.ENOSYS
return
}
2015-12-10 23:58:46 +03:00
func (fs *NotImplementedFileSystem) GetXattr(
ctx context.Context,
op *fuseops.GetXattrOp) (err error) {
err = fuse.ENOSYS
return
}
func (fs *NotImplementedFileSystem) ListXattr(
ctx context.Context,
op *fuseops.ListXattrOp) (err error) {
err = fuse.ENOSYS
return
}
2017-03-06 06:40:50 +03:00
func (fs *NotImplementedFileSystem) SetXattr(
ctx context.Context,
op *fuseops.SetXattrOp) (err error) {
err = fuse.ENOSYS
return
}
2015-06-05 06:51:45 +03:00
func (fs *NotImplementedFileSystem) Destroy() {
}