コード例 #1
0
        private unsafe int Readdir(path *path, void *buf, fuse_fill_dir *filler, ulong offset, fuse_file_info *fi, int flags)
        {
            try
            {
                fuse_fill_dir_Delegate fillDelegate;
                ManagedFiller          previousFiller = _previousFiller;
                if (previousFiller != null && previousFiller.Filler == filler)
                {
                    fillDelegate = previousFiller.Delegate;
                }
                else
                {
                    fillDelegate    = Marshal.GetDelegateForFunctionPointer <fuse_fill_dir_Delegate>(new IntPtr(filler));
                    _previousFiller = new ManagedFiller(filler, fillDelegate);
                }

                var fiF = new FuseFileInfo();
                return(_fileSystem.ReadDir(ToSpan(path), offset, (ReadDirFlags)flags, ToDirectoryContent(buf, fillDelegate), ref fiF));
            }
            catch (Exception ex)
            {
                Console.WriteLine($"READDIR gets error: {ex.Message}");
                return(-EIO);
            }
        }
コード例 #2
0
 private unsafe int Opendir(path *path, fuse_file_info *fi)
 {
     try
     {
         //Console.WriteLine("OPENDIR TOP - Fusemount");
         var fiF = new FuseFileInfo();
         return(_fileSystem.OpenDir(ToSpan(path), ref fiF));
         //return _fileSystem.OpenDir(ToSpan(path), ref ToFileInfoRef(fi));
     }
     catch (Exception ex)
     {
         Console.WriteLine($"OPENDIR gets error: {ex.Message}");
         return(-EIO);
     }
 }
コード例 #3
0
 public virtual int Read(ReadOnlySpan <byte> path, ulong offset, Span <byte> buffer, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #4
0
 public override int OpenDir(ReadOnlySpan <byte> path, ref FuseFileInfo fi)
 => OpenDir(ToString(path), ref fi);
コード例 #5
0
 protected virtual int FSync(string path, bool onlyData, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #6
0
 public override int Flush(ReadOnlySpan <byte> path, ref FuseFileInfo fi)
 => Flush(ToString(path), ref fi);
コード例 #7
0
 public override int FAllocate(ReadOnlySpan <byte> path, int mode, ulong offset, long length, ref FuseFileInfo fi)
 => FAllocate(ToString(path), mode, offset, length, ref fi);
コード例 #8
0
 public override int Create(ReadOnlySpan <byte> path, mode_t mode, ref FuseFileInfo fi)
 => Create(ToString(path), mode, ref fi);
コード例 #9
0
 public override int Write(ReadOnlySpan <byte> path, ulong off, ReadOnlySpan <byte> span, ref FuseFileInfo fi)
 => Write(ToString(path), off, span, ref fi);
コード例 #10
0
 public virtual int ReleaseDir(string path, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #11
0
 public virtual void Release(string path, ref FuseFileInfo fi)
 {
 }
コード例 #12
0
 public virtual int ReleaseDir(ReadOnlySpan <byte> path, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #13
0
 public virtual void Release(ReadOnlySpan <byte> path, ref FuseFileInfo fi)
 {
 }
コード例 #14
0
 public virtual int ReadDir(ReadOnlySpan <byte> path, ulong offset, ReadDirFlags flags, DirectoryContent content, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #15
0
 protected virtual void Release(string path, ref FuseFileInfo fi)
 {
 }
コード例 #16
0
 public virtual int Open(string path, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #17
0
 protected virtual int ReleaseDir(string path, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #18
0
 public virtual int OpenDir(string path, ref FuseFileInfo fi)
 => 0;
コード例 #19
0
 protected virtual int Write(string path, ulong off, ReadOnlySpan <byte> span, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #20
0
 public override int Read(ReadOnlySpan <byte> path, ulong offset, Span <byte> buffer, ref FuseFileInfo fi)
 => Read(ToString(path), offset, buffer, ref fi);
コード例 #21
0
 protected virtual int Create(string path, mode_t mode, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #22
0
 protected virtual int Read(string path, ulong offset, Span <byte> buffer, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #23
0
 protected virtual int FAllocate(string path, int mode, ulong offset, long length, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #24
0
 public override int ReadDir(ReadOnlySpan <byte> path, ulong offset, ReadDirFlags flags, DirectoryContent content, ref FuseFileInfo fi)
 => ReadDir(ToString(path), offset, flags, content, ref fi);
コード例 #25
0
 public override int FSync(ReadOnlySpan <byte> path, bool onlyData, ref FuseFileInfo fi)
 => FSync(ToString(path), onlyData, ref fi);
コード例 #26
0
 protected virtual int ReadDir(string path, ulong offset, ReadDirFlags flags, DirectoryContent content, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #27
0
 protected virtual int Open(string path, ref FuseFileInfo fi)
 => - ENOSYS;
コード例 #28
0
 public override void Release(ReadOnlySpan <byte> path, ref FuseFileInfo fi)
 => Release(ToString(path), ref fi);
コード例 #29
0
 protected virtual int OpenDir(string path, ref FuseFileInfo fi)
 => 0;
コード例 #30
0
 public virtual int OpenDir(ReadOnlySpan <byte> path, ref FuseFileInfo fi)
 => 0;