/// <nodoc /> public static void OverrideFileAccessMode(bool changePermissions, string path) { #if !PLATFORM_WIN if (changePermissions) { // Force 0777 on the file at 'path' - this is a temporary hack when placing files as our cache layer // currently does not track Unix file access flags when putting / placing files LibC.chmod(path, LibC.AllFilePermssionMask); } #endif }
// Set metadata public override int ChMod(ReadOnlySpan <byte> path, mode_t mode, FuseFileInfoRef fiRef, Guid fileGuid) { path = base.TransformPath(path); if (debug) { Console.WriteLine($"NeoFS::ChMod()"); } var res = LibC.chmod(toBp(path), mode); if (res < 0) { return(-LibC.errno); } return(0); }