static private Open ( Func |
||
fdFunc | Func |
/// The function that creates the file descriptor. Returns the file descriptor on success, or an invalid /// file descriptor on error with Marshal.GetLastWin32Error() set to the error code. /// |
return |
internal static SafeFileHandle Open(Func<SafeFileHandle> fdFunc)
{
SafeFileHandle handle = Interop.CheckIo(fdFunc());
Debug.Assert(!handle.IsInvalid, "File descriptor is invalid");
return handle;
}
}
SafeFileHandleHelper::Open ( string path, Interop flags, int mode ) : |