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