Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Globalization;
using System.Runtime.InteropServices;

namespace System.IO.Abstractions.TestingHelpers;

Expand Down Expand Up @@ -55,7 +56,9 @@ public static ArgumentException IllegalCharactersInPath(string paramName = null)
: new ArgumentException(StringResources.Manager.GetString("ILLEGAL_CHARACTERS_IN_PATH_EXCEPTION"));

public static ArgumentException InvalidUncPath(string paramName) =>
new ArgumentException(@"The UNC path should be of the form \\server\share.", paramName);
RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
? new ArgumentException(@"The UNC path should be of the form \\server\share.", paramName)
: new ArgumentException(@"The UNC path should be of the form //server/share.", paramName);

public static IOException ProcessCannotAccessFileInUse(string paramName = null) =>
paramName != null
Expand Down