fusego/fuseutil/not_implemented_file_system.go

125 lines
3.0 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 (
"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{}
func (fs *NotImplementedFileSystem) Init(
2015-03-25 01:54:12 +03:00
op *fuseops.InitOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) LookUpInode(
2015-03-25 01:54:12 +03:00
op *fuseops.LookUpInodeOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) GetInodeAttributes(
2015-03-25 01:54:12 +03:00
op *fuseops.GetInodeAttributesOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) SetInodeAttributes(
2015-03-25 01:54:12 +03:00
op *fuseops.SetInodeAttributesOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) ForgetInode(
2015-03-25 01:54:12 +03:00
op *fuseops.ForgetInodeOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) MkDir(
2015-03-25 01:54:12 +03:00
op *fuseops.MkDirOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) CreateFile(
2015-03-25 01:54:12 +03:00
op *fuseops.CreateFileOp) {
op.Respond(fuse.ENOSYS)
}
2015-05-19 08:33:19 +03:00
func (fs *NotImplementedFileSystem) CreateSymlink(
op *fuseops.CreateSymlinkOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) RmDir(
2015-03-25 01:54:12 +03:00
op *fuseops.RmDirOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) Unlink(
2015-03-25 01:54:12 +03:00
op *fuseops.UnlinkOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) OpenDir(
2015-03-25 01:54:12 +03:00
op *fuseops.OpenDirOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) ReadDir(
2015-03-25 01:54:12 +03:00
op *fuseops.ReadDirOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) ReleaseDirHandle(
2015-03-25 01:54:12 +03:00
op *fuseops.ReleaseDirHandleOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) OpenFile(
2015-03-25 01:54:12 +03:00
op *fuseops.OpenFileOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) ReadFile(
2015-03-25 01:54:12 +03:00
op *fuseops.ReadFileOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) WriteFile(
2015-03-25 01:54:12 +03:00
op *fuseops.WriteFileOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) SyncFile(
2015-03-25 01:54:12 +03:00
op *fuseops.SyncFileOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) FlushFile(
2015-03-25 01:54:12 +03:00
op *fuseops.FlushFileOp) {
op.Respond(fuse.ENOSYS)
}
func (fs *NotImplementedFileSystem) ReleaseFileHandle(
2015-03-25 01:54:12 +03:00
op *fuseops.ReleaseFileHandleOp) {
op.Respond(fuse.ENOSYS)
}