Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@ -169,14 +169,42 @@ namespace System.IO {
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
extern static bool GetDiskFreeSpaceInternal (string pathName, out ulong freeBytesAvail,
unsafe extern static bool GetDiskFreeSpaceInternal (char *pathName, int pathName_length, out ulong freeBytesAvail,
out ulong totalNumberOfBytes, out ulong totalNumberOfFreeBytes,
out MonoIOError error);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
extern static uint GetDriveTypeInternal (string rootPathName);
unsafe static bool GetDiskFreeSpaceInternal (string pathName, out ulong freeBytesAvail,
out ulong totalNumberOfBytes, out ulong totalNumberOfFreeBytes,
out MonoIOError error)
{
// FIXME Check for embedded nuls here or in native.
fixed (char *fixed_pathName = pathName) {
return GetDiskFreeSpaceInternal (fixed_pathName, pathName?.Length ?? 0,
out freeBytesAvail, out totalNumberOfBytes, out totalNumberOfFreeBytes,
out error);
}
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
extern static string GetDriveFormat (string rootPathName);
unsafe extern static uint GetDriveTypeInternal (char *rootPathName, int rootPathName_length);
unsafe static uint GetDriveTypeInternal (string rootPathName)
{
// FIXME Check for embedded nuls here or in native.
fixed (char *fixed_rootPathName = rootPathName) {
return GetDriveTypeInternal (fixed_rootPathName, rootPathName?.Length ?? 0);
}
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
unsafe extern static string GetDriveFormatInternal (char *rootPathName, int rootPathName_length);
unsafe static string GetDriveFormat (string rootPathName)
{
// FIXME Check for embedded nuls here or in native.
fixed (char *fixed_rootPathName = rootPathName) {
return GetDriveFormatInternal (fixed_rootPathName, rootPathName?.Length ?? 0);
}
}
}
}