You've already forked linux-packaging-mono
Imported Upstream version 6.0.0.265
Former-commit-id: e0ef9e54469db4958572c478db7f39198da10cad
This commit is contained in:
parent
3d63c66c1d
commit
8f11a00d09
@@ -8,6 +8,15 @@ using System.Text;
|
||||
|
||||
internal static class DllImports
|
||||
{
|
||||
#if MONO && MOBILE
|
||||
internal static int GetLogicalDrives() => throw new PlatformNotSupportedException();
|
||||
|
||||
internal static bool GetDiskFreeSpaceEx(String drive, out long freeBytesForUser, out long totalBytes, out long freeBytes) => throw new PlatformNotSupportedException();
|
||||
|
||||
internal static bool GetVolumeInformation(String drive, [Out]StringBuilder volumeName, int volumeNameBufLen, out int volSerialNumber, out int maxFileNameLen, out int fileSystemFlags, [Out]StringBuilder fileSystemName, int fileSystemNameBufLen) => throw new PlatformNotSupportedException();
|
||||
|
||||
internal static int GetDriveType(string drive) => throw new PlatformNotSupportedException();
|
||||
#else
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
internal static extern int GetLogicalDrives();
|
||||
|
||||
@@ -19,5 +28,6 @@ internal static class DllImports
|
||||
|
||||
[DllImport("kernel32.dll", EntryPoint = "GetDriveTypeW", CharSet = CharSet.Unicode, SetLastError = true, BestFitMapping = false)]
|
||||
internal static extern int GetDriveType(string drive);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,11 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
public static class MountHelper
|
||||
{
|
||||
#if MONO && MOBILE
|
||||
private static bool GetVolumeNameForVolumeMountPoint(String volumeName, StringBuilder uniqueVolumeName, int uniqueNameBufferCapacity) => throw new PlatformNotSupportedException();
|
||||
private static bool SetVolumeMountPoint(String mountPoint, String uniqueVolumeName) => throw new PlatformNotSupportedException();
|
||||
private static bool DeleteVolumeMountPoint(String mountPoint) => throw new PlatformNotSupportedException();
|
||||
#else
|
||||
[DllImport("kernel32.dll", EntryPoint = "GetVolumeNameForVolumeMountPointW", CharSet = CharSet.Unicode, BestFitMapping = false, SetLastError = true)]
|
||||
private static extern bool GetVolumeNameForVolumeMountPoint(String volumeName, StringBuilder uniqueVolumeName, int uniqueNameBufferCapacity);
|
||||
// unique volume name must be "\\?\Volume{GUID}\"
|
||||
@@ -28,6 +33,7 @@ public static class MountHelper
|
||||
private static extern bool SetVolumeMountPoint(String mountPoint, String uniqueVolumeName);
|
||||
[DllImport("kernel32.dll", EntryPoint = "DeleteVolumeMountPointW", CharSet = CharSet.Unicode, BestFitMapping = false, SetLastError = true)]
|
||||
private static extern bool DeleteVolumeMountPoint(String mountPoint);
|
||||
#endif
|
||||
|
||||
/// <summary>Creates a symbolic link using command line tools</summary>
|
||||
/// <param name="linkPath">The existing file</param>
|
||||
|
||||
Reference in New Issue
Block a user