github.com/hanwen/go-fuse@v1.0.0/fuse/defaultraw.go (about)

     1  // Copyright 2016 the Go-FUSE Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package fuse
     6  
     7  import (
     8  	"os"
     9  )
    10  
    11  // NewDefaultRawFileSystem returns ENOSYS (not implemented) for all
    12  // operations.
    13  func NewDefaultRawFileSystem() RawFileSystem {
    14  	return (*defaultRawFileSystem)(nil)
    15  }
    16  
    17  type defaultRawFileSystem struct{}
    18  
    19  func (fs *defaultRawFileSystem) Init(*Server) {
    20  }
    21  
    22  func (fs *defaultRawFileSystem) String() string {
    23  	return os.Args[0]
    24  }
    25  
    26  func (fs *defaultRawFileSystem) SetDebug(dbg bool) {
    27  }
    28  
    29  func (fs *defaultRawFileSystem) StatFs(header *InHeader, out *StatfsOut) Status {
    30  	return ENOSYS
    31  }
    32  
    33  func (fs *defaultRawFileSystem) Lookup(header *InHeader, name string, out *EntryOut) (code Status) {
    34  	return ENOSYS
    35  }
    36  
    37  func (fs *defaultRawFileSystem) Forget(nodeID, nlookup uint64) {
    38  }
    39  
    40  func (fs *defaultRawFileSystem) GetAttr(input *GetAttrIn, out *AttrOut) (code Status) {
    41  	return ENOSYS
    42  }
    43  
    44  func (fs *defaultRawFileSystem) Open(input *OpenIn, out *OpenOut) (status Status) {
    45  	return OK
    46  }
    47  
    48  func (fs *defaultRawFileSystem) SetAttr(input *SetAttrIn, out *AttrOut) (code Status) {
    49  	return ENOSYS
    50  }
    51  
    52  func (fs *defaultRawFileSystem) Readlink(header *InHeader) (out []byte, code Status) {
    53  	return nil, ENOSYS
    54  }
    55  
    56  func (fs *defaultRawFileSystem) Mknod(input *MknodIn, name string, out *EntryOut) (code Status) {
    57  	return ENOSYS
    58  }
    59  
    60  func (fs *defaultRawFileSystem) Mkdir(input *MkdirIn, name string, out *EntryOut) (code Status) {
    61  	return ENOSYS
    62  }
    63  
    64  func (fs *defaultRawFileSystem) Unlink(header *InHeader, name string) (code Status) {
    65  	return ENOSYS
    66  }
    67  
    68  func (fs *defaultRawFileSystem) Rmdir(header *InHeader, name string) (code Status) {
    69  	return ENOSYS
    70  }
    71  
    72  func (fs *defaultRawFileSystem) Symlink(header *InHeader, pointedTo string, linkName string, out *EntryOut) (code Status) {
    73  	return ENOSYS
    74  }
    75  
    76  func (fs *defaultRawFileSystem) Rename(input *RenameIn, oldName string, newName string) (code Status) {
    77  	return ENOSYS
    78  }
    79  
    80  func (fs *defaultRawFileSystem) Link(input *LinkIn, name string, out *EntryOut) (code Status) {
    81  	return ENOSYS
    82  }
    83  
    84  func (fs *defaultRawFileSystem) GetXAttrSize(header *InHeader, attr string) (size int, code Status) {
    85  	return 0, ENOSYS
    86  }
    87  
    88  func (fs *defaultRawFileSystem) GetXAttrData(header *InHeader, attr string) (data []byte, code Status) {
    89  	return nil, ENOATTR
    90  }
    91  
    92  func (fs *defaultRawFileSystem) SetXAttr(input *SetXAttrIn, attr string, data []byte) Status {
    93  	return ENOSYS
    94  }
    95  
    96  func (fs *defaultRawFileSystem) ListXAttr(header *InHeader) (data []byte, code Status) {
    97  	return nil, ENOSYS
    98  }
    99  
   100  func (fs *defaultRawFileSystem) RemoveXAttr(header *InHeader, attr string) Status {
   101  	return ENOSYS
   102  }
   103  
   104  func (fs *defaultRawFileSystem) Access(input *AccessIn) (code Status) {
   105  	return ENOSYS
   106  }
   107  
   108  func (fs *defaultRawFileSystem) Create(input *CreateIn, name string, out *CreateOut) (code Status) {
   109  	return ENOSYS
   110  }
   111  
   112  func (fs *defaultRawFileSystem) OpenDir(input *OpenIn, out *OpenOut) (status Status) {
   113  	return ENOSYS
   114  }
   115  
   116  func (fs *defaultRawFileSystem) Read(input *ReadIn, buf []byte) (ReadResult, Status) {
   117  	return nil, ENOSYS
   118  }
   119  
   120  func (fs *defaultRawFileSystem) GetLk(in *LkIn, out *LkOut) (code Status) {
   121  	return ENOSYS
   122  }
   123  
   124  func (fs *defaultRawFileSystem) SetLk(in *LkIn) (code Status) {
   125  	return ENOSYS
   126  }
   127  
   128  func (fs *defaultRawFileSystem) SetLkw(in *LkIn) (code Status) {
   129  	return ENOSYS
   130  }
   131  
   132  func (fs *defaultRawFileSystem) Release(input *ReleaseIn) {
   133  }
   134  
   135  func (fs *defaultRawFileSystem) Write(input *WriteIn, data []byte) (written uint32, code Status) {
   136  	return 0, ENOSYS
   137  }
   138  
   139  func (fs *defaultRawFileSystem) Flush(input *FlushIn) Status {
   140  	return OK
   141  }
   142  
   143  func (fs *defaultRawFileSystem) Fsync(input *FsyncIn) (code Status) {
   144  	return ENOSYS
   145  }
   146  
   147  func (fs *defaultRawFileSystem) ReadDir(input *ReadIn, l *DirEntryList) Status {
   148  	return ENOSYS
   149  }
   150  
   151  func (fs *defaultRawFileSystem) ReadDirPlus(input *ReadIn, l *DirEntryList) Status {
   152  	return ENOSYS
   153  }
   154  
   155  func (fs *defaultRawFileSystem) ReleaseDir(input *ReleaseIn) {
   156  }
   157  
   158  func (fs *defaultRawFileSystem) FsyncDir(input *FsyncIn) (code Status) {
   159  	return ENOSYS
   160  }
   161  
   162  func (fs *defaultRawFileSystem) Fallocate(in *FallocateIn) (code Status) {
   163  	return ENOSYS
   164  }