Example #1
0
 private unsafe int Write(path *path, void *buffer, UIntPtr size, ulong off, fuse_file_info *fi)
 {
     try
     {
         // TODO: handle size > int.MaxValue
         return(_fileSystem.Write(ToSpan(path), off, new ReadOnlySpan <byte>(buffer, (int)size), ref ToFileInfoRef(fi)));
     }
     catch
     {
         return(-EIO);
     }
 }
Example #2
0
 private unsafe int Write(path *path, void *buffer, UIntPtr size, ulong off, fuse_file_info *fi)
 {
     try
     {
         // TODO: handle size > int.MaxValue
         return(_fileSystem.Write(ToSpan(path), off, new ReadOnlySpan <byte>(buffer, (int)size), ref ToFileInfoRef(fi)));
     }
     catch (Exception ex)
     {
         Console.WriteLine($"WRITE gets error: {ex.Message}");
         return(-EIO);
     }
 }