return new IOException (message, unchecked((int)0x80070000) | (int)error);
case MonoIOError.ERROR_INVALID_DRIVE:
message = String.Format ("Could not find the drive '{0}'. The drive might not be ready or might not be mapped.", path);
return new IOException (message, unchecked((int)0x80070000) | (int)error);
case MonoIOError.ERROR_INVALID_DRIVE:
message = String.Format ("Could not find the drive '{0}'. The drive might not be ready or might not be mapped.", path);
return new DriveNotFoundException (message);
#else
return new IOException (message, unchecked((int)0x80070000) | (int)error);
return new DriveNotFoundException (message);
#else
return new IOException (message, unchecked((int)0x80070000) | (int)error);
case MonoIOError.ERROR_NOT_SAME_DEVICE:
message = "Source and destination are not on the same device";
return new IOException (message, unchecked((int)0x80070000) | (int)error);
case MonoIOError.ERROR_NOT_SAME_DEVICE:
message = "Source and destination are not on the same device";
return new IOException (message, unchecked((int)0x80070000) | (int)error);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern static bool RemoveDirectory (string path, out MonoIOError error);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern static bool RemoveDirectory (string path, out MonoIOError error);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern static string GetCurrentDirectory (out MonoIOError error);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern static string GetCurrentDirectory (out MonoIOError error);
- public extern static string FindFirst (string path, string pattern, out FileAttributes result_attr, out MonoIOError error, out IntPtr handle);
-
+ public extern static IntPtr FindFirstFile (string path_with_pattern, out string fileName, out int fileAttr, out int error);
+
- public extern static string FindNext (IntPtr handle, out FileAttributes result_attr, out MonoIOError error);
-
+ public extern static bool FindNextFile (IntPtr hnd, out string fileName, out int fileAttr, out int error);
+
public static bool Exists (string path, out MonoIOError error)
{
FileAttributes attrs = GetFileAttributes (path,
public static bool Exists (string path, out MonoIOError error)
{
FileAttributes attrs = GetFileAttributes (path,