private NativeStat.StatBuffer StatFile(string fileName) { if (NativeStat.Stat(fileName, out NativeStat.StatBuffer statBuffer) != 0) { NativeMethods.ThrowLastWin32Exception($"Failed to stat {fileName}"); } return(statBuffer); }
private static NativeStat.StatBuffer StatFile(string fileName) { NativeStat.StatBuffer statBuffer = new NativeStat.StatBuffer(); if (NativeStat.Stat(fileName, out statBuffer) != 0) { throw new Win32Exception(Marshal.GetLastWin32Error(), $"Failed to stat {fileName}"); } return(statBuffer); }