public static long[] GetFreeShareSpace(string share)
{
long freeBytesForUser = -1, totalBytes = -1, freeBytes = -1;
if (!SafeNativeMethods.GetDiskFreeSpaceEx(share, out freeBytesForUser, out totalBytes, out freeBytes))
{
LibraryLogging.Error("Unable to enumerate free space on {0} Error:{1}", share, LastError());
return new long[] { -1, -1, -1 };
}
return new long[] { freeBytesForUser, totalBytes, freeBytes };
}