// Write public override int Create(ReadOnlySpan <byte> path, mode_t mode, ref FuseFileInfo fi, Guid fileGuid) { path = base.TransformPath(path); if (debug) { Console.WriteLine($"NeoFS::Create()"); } fi.fh = 0; var res = LibC.open(toBp(path), fi.flags, mode); if (res < 0) { return(-LibC.errno); } fi.fh = (ulong)res; // Make these settable (these actually come in on the Init method, which TDMS isn't handling yet) var uid = (uid_t)10010; var gid = (gid_t)10010; res = LibC.chown(toBp(path), uid, gid); return(0); }
public override int Chown(ReadOnlySpan <byte> path, uint uid, uint gid, FuseFileInfoRef fiRef, Guid fileGuid) { path = base.TransformPath(path); if (debug) { Console.WriteLine($"NeoFS::Chown()"); } var res = LibC.chown(toBp(path), uid, gid); if (res < 0) { return(-LibC.errno); } return(0); }