File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
System.IO.Abstractions.TestingHelpers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ namespace System.IO.Abstractions.TestingHelpers
44{
55 internal static class CommonExceptions
66 {
7+ private const int _fileLockHResult = unchecked ( ( int ) 0x80070020 ) ;
8+
79 public static FileNotFoundException FileNotFound ( string path ) =>
810 new FileNotFoundException (
911 string . Format (
@@ -57,7 +59,7 @@ public static Exception InvalidUncPath(string paramName) =>
5759
5860 public static IOException ProcessCannotAccessFileInUse ( string paramName = null ) =>
5961 paramName != null
60- ? new IOException ( string . Format ( StringResources . Manager . GetString ( "PROCESS_CANNOT_ACCESS_FILE_IN_USE_WITH_FILENAME" ) , paramName ) )
61- : new IOException ( StringResources . Manager . GetString ( "PROCESS_CANNOT_ACCESS_FILE_IN_USE" ) ) ;
62+ ? new IOException ( string . Format ( StringResources . Manager . GetString ( "PROCESS_CANNOT_ACCESS_FILE_IN_USE_WITH_FILENAME" ) , paramName ) , _fileLockHResult )
63+ : new IOException ( StringResources . Manager . GetString ( "PROCESS_CANNOT_ACCESS_FILE_IN_USE" ) , _fileLockHResult ) ;
6264 }
6365}
You can’t perform that action at this time.
0 commit comments