From 8dce66768435e914112d51b25d41e7e41b72fdf4 Mon Sep 17 00:00:00 2001 From: David Cantu Date: Mon, 23 Aug 2021 17:46:46 -0700 Subject: [PATCH 1/2] Clean-up duplicated PathInternal files --- .../Common/src/System/IO/PathInternal.Unix.cs | 44 ---- .../src/System/IO/PathInternal.Windows.cs | 195 ------------------ .../Common/tests/Common.Tests.csproj | 4 +- .../src/Microsoft.IO.Redist.csproj | 2 +- .../src/System.IO.Compression.ZipFile.csproj | 2 +- .../src/System.IO.Compression.csproj | 6 +- .../src/System.IO.FileSystem.DriveInfo.csproj | 6 +- .../src/System.IO.FileSystem.Watcher.csproj | 10 +- ...stem.IO.FileSystem.Net5Compat.Tests.csproj | 2 +- .../tests/System.IO.FileSystem.Tests.csproj | 2 +- .../src/System.IO.Ports.csproj | 7 +- .../System/IO/Ports/SerialStream.Windows.cs | 8 +- .../System.Private.CoreLib.Shared.projitems | 2 +- .../System/IO/PathInternal.CaseSensitivity.cs | 0 14 files changed, 27 insertions(+), 263 deletions(-) delete mode 100644 src/libraries/Common/src/System/IO/PathInternal.Unix.cs delete mode 100644 src/libraries/Common/src/System/IO/PathInternal.Windows.cs rename src/libraries/{Common => System.Private.CoreLib}/src/System/IO/PathInternal.CaseSensitivity.cs (100%) diff --git a/src/libraries/Common/src/System/IO/PathInternal.Unix.cs b/src/libraries/Common/src/System/IO/PathInternal.Unix.cs deleted file mode 100644 index cc1c9bc15f9456..00000000000000 --- a/src/libraries/Common/src/System/IO/PathInternal.Unix.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.Diagnostics; -using System.Text; - -namespace System.IO -{ - /// Contains internal path helpers that are shared between many projects. - internal static partial class PathInternal - { - internal static int GetRootLength(ReadOnlySpan path) - { - return path.Length > 0 && IsDirectorySeparator(path[0]) ? 1 : 0; - } - - internal static bool EndsInDirectorySeparator(ReadOnlySpan path) - => path.Length > 0 && IsDirectorySeparator(path[path.Length - 1]); - - internal static ReadOnlySpan TrimEndingDirectorySeparator(ReadOnlySpan path) => - EndsInDirectorySeparator(path) && !IsRoot(path) ? - path.Slice(0, path.Length - 1) : - path; - - internal static bool IsRoot(ReadOnlySpan path) - => path.Length == GetRootLength(path); - - internal static bool IsDirectorySeparator(char c) - { - // The alternate directory separator char is the same as the directory separator, - // so we only need to check one. - Debug.Assert(Path.DirectorySeparatorChar == Path.AltDirectorySeparatorChar); - return c == Path.DirectorySeparatorChar; - } - - internal static bool IsPartiallyQualified(string path) - { - // This is much simpler than Windows where paths can be rooted, but not fully qualified (such as Drive Relative) - // As long as the path is rooted in Unix it doesn't use the current directory and therefore is fully qualified. - return string.IsNullOrEmpty(path) || path[0] != Path.DirectorySeparatorChar; - } - } -} diff --git a/src/libraries/Common/src/System/IO/PathInternal.Windows.cs b/src/libraries/Common/src/System/IO/PathInternal.Windows.cs deleted file mode 100644 index 3d5789183fda81..00000000000000 --- a/src/libraries/Common/src/System/IO/PathInternal.Windows.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; - -namespace System.IO -{ - /// Contains internal path helpers that are shared between many projects. - internal static partial class PathInternal - { - // All paths in Win32 ultimately end up becoming a path to a File object in the Windows object manager. Passed in paths get mapped through - // DosDevice symbolic links in the object tree to actual File objects under \Devices. To illustrate, this is what happens with a typical - // path "Foo" passed as a filename to any Win32 API: - // - // 1. "Foo" is recognized as a relative path and is appended to the current directory (say, "C:\" in our example) - // 2. "C:\Foo" is prepended with the DosDevice namespace "\??\" - // 3. CreateFile tries to create an object handle to the requested file "\??\C:\Foo" - // 4. The Object Manager recognizes the DosDevices prefix and looks - // a. First in the current session DosDevices ("\Sessions\1\DosDevices\" for example, mapped network drives go here) - // b. If not found in the session, it looks in the Global DosDevices ("\GLOBAL??\") - // 5. "C:" is found in DosDevices (in our case "\GLOBAL??\C:", which is a symbolic link to "\Device\HarddiskVolume6") - // 6. The full path is now "\Device\HarddiskVolume6\Foo", "\Device\HarddiskVolume6" is a File object and parsing is handed off - // to the registered parsing method for Files - // 7. The registered open method for File objects is invoked to create the file handle which is then returned - // - // There are multiple ways to directly specify a DosDevices path. The final format of "\??\" is one way. It can also be specified - // as "\\.\" (the most commonly documented way) and "\\?\". If the question mark syntax is used the path will skip normalization - // (essentially GetFullPathName()) and path length checks. - - // Windows Kernel-Mode Object Manager - // https://msdn.microsoft.com/en-us/library/windows/hardware/ff565763.aspx - // https://channel9.msdn.com/Shows/Going+Deep/Windows-NT-Object-Manager - // - // Introduction to MS-DOS Device Names - // https://msdn.microsoft.com/en-us/library/windows/hardware/ff548088.aspx - // - // Local and Global MS-DOS Device Names - // https://msdn.microsoft.com/en-us/library/windows/hardware/ff554302.aspx - - internal const string ExtendedDevicePathPrefix = @"\\?\"; - internal const string UncPathPrefix = @"\\"; - internal const string UncDevicePrefixToInsert = @"?\UNC\"; - internal const string UncExtendedPathPrefix = @"\\?\UNC\"; - internal const string DevicePathPrefix = @"\\.\"; - - internal const int MaxShortPath = 260; - - // \\?\, \\.\, \??\ - internal const int DevicePrefixLength = 4; - - /// - /// Returns true if the given character is a valid drive letter - /// - internal static bool IsValidDriveChar(char value) - { - return ((value >= 'A' && value <= 'Z') || (value >= 'a' && value <= 'z')); - } - - private static bool EndsWithPeriodOrSpace(string path) - { - if (string.IsNullOrEmpty(path)) - return false; - - char c = path[path.Length - 1]; - return c == ' ' || c == '.'; - } - - /// - /// Adds the extended path prefix (\\?\) if not already a device path, IF the path is not relative, - /// AND the path is more than 259 characters. (> MAX_PATH + null). This will also insert the extended - /// prefix if the path ends with a period or a space. Trailing periods and spaces are normally eaten - /// away from paths during normalization, but if we see such a path at this point it should be - /// normalized and has retained the final characters. (Typically from one of the *Info classes) - /// - [return: NotNullIfNotNull("path")] - internal static string? EnsureExtendedPrefixIfNeeded(string? path) - { - if (path != null && (path.Length >= MaxShortPath || EndsWithPeriodOrSpace(path))) - { - return EnsureExtendedPrefix(path); - } - else - { - return path; - } - } - - /// - /// Adds the extended path prefix (\\?\) if not relative or already a device path. - /// - internal static string EnsureExtendedPrefix(string path) - { - // Putting the extended prefix on the path changes the processing of the path. It won't get normalized, which - // means adding to relative paths will prevent them from getting the appropriate current directory inserted. - - // If it already has some variant of a device path (\??\, \\?\, \\.\, //./, etc.) we don't need to change it - // as it is either correct or we will be changing the behavior. When/if Windows supports long paths implicitly - // in the future we wouldn't want normalization to come back and break existing code. - - // In any case, all internal usages should be hitting normalize path (Path.GetFullPath) before they hit this - // shimming method. (Or making a change that doesn't impact normalization, such as adding a filename to a - // normalized base path.) - if (IsPartiallyQualified(path) || IsDevice(path)) - return path; - - // Given \\server\share in longpath becomes \\?\UNC\server\share - if (path.StartsWith(UncPathPrefix, StringComparison.OrdinalIgnoreCase)) - return path.Insert(2, UncDevicePrefixToInsert); - - return ExtendedDevicePathPrefix + path; - } - - /// - /// Returns true if the path uses any of the DOS device path syntaxes. ("\\.\", "\\?\", or "\??\") - /// - internal static bool IsDevice(string path) - { - // If the path begins with any two separators is will be recognized and normalized and prepped with - // "\??\" for internal usage correctly. "\??\" is recognized and handled, "/??/" is not. - return IsExtended(path) - || - ( - path.Length >= DevicePrefixLength - && IsDirectorySeparator(path[0]) - && IsDirectorySeparator(path[1]) - && (path[2] == '.' || path[2] == '?') - && IsDirectorySeparator(path[3]) - ); - } - - /// - /// Returns true if the path uses the canonical form of extended syntax ("\\?\" or "\??\"). If the - /// path matches exactly (cannot use alternate directory separators) Windows will skip normalization - /// and path length checks. - /// - internal static bool IsExtended(string path) - { - // While paths like "//?/C:/" will work, they're treated the same as "\\.\" paths. - // Skipping of normalization will *only* occur if back slashes ('\') are used. - return path.Length >= DevicePrefixLength - && path[0] == '\\' - && (path[1] == '\\' || path[1] == '?') - && path[2] == '?' - && path[3] == '\\'; - } - - /// - /// Returns true if the path specified is relative to the current drive or working directory. - /// Returns false if the path is fixed to a specific drive or UNC path. This method does no - /// validation of the path (URIs will be returned as relative as a result). - /// - /// - /// Handles paths that use the alternate directory separator. It is a frequent mistake to - /// assume that rooted paths (Path.IsPathRooted) are not relative. This isn't the case. - /// "C:a" is drive relative- meaning that it will be resolved against the current directory - /// for C: (rooted, but relative). "C:\a" is rooted and not relative (the current directory - /// will not be used to modify the path). - /// - internal static bool IsPartiallyQualified(string path) - { - if (path.Length < 2) - { - // It isn't fixed, it must be relative. There is no way to specify a fixed - // path with one character (or less). - return true; - } - - if (IsDirectorySeparator(path[0])) - { - // There is no valid way to specify a relative path with two initial slashes or - // \? as ? isn't valid for drive relative paths and \??\ is equivalent to \\?\ - return !(path[1] == '?' || IsDirectorySeparator(path[1])); - } - - // The only way to specify a fixed path that doesn't begin with two slashes - // is the drive, colon, slash format- i.e. C:\ - return !((path.Length >= 3) - && (path[1] == Path.VolumeSeparatorChar) - && IsDirectorySeparator(path[2]) - // To match old behavior we'll check the drive character for validity as the path is technically - // not qualified if you don't have a valid drive. "=:\" is the "=" file's default data stream. - && IsValidDriveChar(path[0])); - } - - /// - /// True if the given character is a directory separator. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static bool IsDirectorySeparator(char c) - { - return c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar; - } - } -} diff --git a/src/libraries/Common/tests/Common.Tests.csproj b/src/libraries/Common/tests/Common.Tests.csproj index ba76497cfc5568..83b978227f5aae 100644 --- a/src/libraries/Common/tests/Common.Tests.csproj +++ b/src/libraries/Common/tests/Common.Tests.csproj @@ -1,4 +1,4 @@ - + true true @@ -26,7 +26,7 @@ Link="Common\System\Collections\Generic\LargeArrayBuilder.cs" /> - diff --git a/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj b/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj index 674d785cb7e8bb..07448aa63df374 100644 --- a/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj +++ b/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj @@ -202,7 +202,7 @@ Link="Common\System\IO\FileSystem.Attributes.Windows.cs" /> - diff --git a/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj b/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj index 2110ae810ea63f..69fdb053de03d4 100644 --- a/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj +++ b/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj @@ -11,7 +11,7 @@ - diff --git a/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj b/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj index 0ffa0044e2a167..e8f806f3fbe47d 100644 --- a/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj +++ b/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj @@ -1,4 +1,4 @@ - + true $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser @@ -41,8 +41,6 @@ - @@ -51,8 +49,6 @@ - diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj b/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj index d07e89ec979be1..2ed89c0848a6db 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj +++ b/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj @@ -10,7 +10,7 @@ - @@ -46,8 +46,6 @@ Link="Common\System\IO\Win32Marshal.cs" /> - @@ -60,8 +58,6 @@ Link="Common\Interop\Unix\Interop.UnixFileSystemTypes.cs" /> - + true $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent);$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-MacCatalyst;$(NetCoreAppCurrent)-FreeBSD @@ -23,11 +23,13 @@ - - + @@ -59,7 +61,7 @@ Link="Common\Interop\Unix\Interop.Errors.cs" /> - diff --git a/src/libraries/System.IO.FileSystem/tests/Net5CompatTests/System.IO.FileSystem.Net5Compat.Tests.csproj b/src/libraries/System.IO.FileSystem/tests/Net5CompatTests/System.IO.FileSystem.Net5Compat.Tests.csproj index 745ff60368b2ef..a53bcdc584cd3d 100644 --- a/src/libraries/System.IO.FileSystem/tests/Net5CompatTests/System.IO.FileSystem.Net5Compat.Tests.csproj +++ b/src/libraries/System.IO.FileSystem/tests/Net5CompatTests/System.IO.FileSystem.Net5Compat.Tests.csproj @@ -45,7 +45,7 @@ - diff --git a/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj b/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj index 736d3b1ee5654b..0a3cbab96e3232 100644 --- a/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj +++ b/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj @@ -211,7 +211,7 @@ - diff --git a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj index e017d4db8bf40a..13f737a53f47a6 100644 --- a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj +++ b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj @@ -1,4 +1,4 @@ - + true $(DefineConstants);SERIAL_PORTS @@ -90,7 +90,9 @@ System.IO.Ports.SerialPort Link="Common\Interop\Windows\Interop.SECURITY_ATTRIBUTES.cs" /> - + @@ -140,6 +142,7 @@ System.IO.Ports.SerialPort + diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs index 85eb2f4eaf8a52..56f5ef58522266 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs @@ -564,7 +564,13 @@ internal SerialStream(string portName, int baudRate, Parity parity, int dataBits } if (!portName.StartsWith("COM", StringComparison.OrdinalIgnoreCase) || - !uint.TryParse(portName.Substring(3), out uint portNumber)) + !uint.TryParse( +#if NETCOREAPP + portName.AsSpan(3), +#else + portName.Substring(3), +#endif + out uint portNumber)) { throw new ArgumentException(SR.Format(SR.Arg_InvalidSerialPort, portName), nameof(portName)); } diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems index a1801b9c04b921..ca172d171a876b 100644 --- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems +++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems @@ -1213,7 +1213,7 @@ Common\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAttribute.cs - + Common\System\IO\PathInternal.CaseSensitivity.cs diff --git a/src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs b/src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.CaseSensitivity.cs similarity index 100% rename from src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs rename to src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.CaseSensitivity.cs From 0d2674c1ead812523023de84015337c760e9fa3c Mon Sep 17 00:00:00 2001 From: David Cantu Date: Fri, 27 Aug 2021 12:53:25 -0700 Subject: [PATCH 2/2] Move PathInternal*.cs to Common --- .../src/System/IO/PathInternal.CaseSensitivity.cs | 0 .../src/System/IO/PathInternal.Unix.cs | 0 .../src/System/IO/PathInternal.Windows.cs | 0 .../src/System/IO/PathInternal.cs | 0 src/libraries/Common/tests/Common.Tests.csproj | 8 ++++---- .../src/Microsoft.IO.Redist.csproj | 6 +++--- .../src/System.IO.Compression.ZipFile.csproj | 2 +- .../src/System.IO.FileSystem.AccessControl.csproj | 4 ++-- .../src/System.IO.FileSystem.DriveInfo.csproj | 2 +- .../src/System.IO.FileSystem.Watcher.csproj | 6 +++--- .../System.IO.FileSystem.Net5Compat.Tests.csproj | 6 +++--- .../tests/System.IO.FileSystem.Tests.csproj | 6 +++--- .../System.IO.Ports/src/System.IO.Ports.csproj | 2 +- .../src/System.Private.CoreLib.Shared.projitems | 14 ++++++++++---- 14 files changed, 31 insertions(+), 25 deletions(-) rename src/libraries/{System.Private.CoreLib => Common}/src/System/IO/PathInternal.CaseSensitivity.cs (100%) rename src/libraries/{System.Private.CoreLib => Common}/src/System/IO/PathInternal.Unix.cs (100%) rename src/libraries/{System.Private.CoreLib => Common}/src/System/IO/PathInternal.Windows.cs (100%) rename src/libraries/{System.Private.CoreLib => Common}/src/System/IO/PathInternal.cs (100%) diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.CaseSensitivity.cs b/src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs similarity index 100% rename from src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.CaseSensitivity.cs rename to src/libraries/Common/src/System/IO/PathInternal.CaseSensitivity.cs diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.Unix.cs b/src/libraries/Common/src/System/IO/PathInternal.Unix.cs similarity index 100% rename from src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.Unix.cs rename to src/libraries/Common/src/System/IO/PathInternal.Unix.cs diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.Windows.cs b/src/libraries/Common/src/System/IO/PathInternal.Windows.cs similarity index 100% rename from src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.Windows.cs rename to src/libraries/Common/src/System/IO/PathInternal.Windows.cs diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.cs b/src/libraries/Common/src/System/IO/PathInternal.cs similarity index 100% rename from src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.cs rename to src/libraries/Common/src/System/IO/PathInternal.cs diff --git a/src/libraries/Common/tests/Common.Tests.csproj b/src/libraries/Common/tests/Common.Tests.csproj index 83b978227f5aae..ff71eff871a294 100644 --- a/src/libraries/Common/tests/Common.Tests.csproj +++ b/src/libraries/Common/tests/Common.Tests.csproj @@ -26,7 +26,7 @@ Link="Common\System\Collections\Generic\LargeArrayBuilder.cs" /> - @@ -100,7 +100,7 @@ Link="Common\System\Net\Logging\NetEventSource.Common.cs" /> - @@ -109,7 +109,7 @@ - @@ -126,7 +126,7 @@ - diff --git a/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj b/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj index 07448aa63df374..5c278ee3b83d2b 100644 --- a/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj +++ b/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj @@ -130,9 +130,9 @@ Link="System\IO\Path.Windows.cs" /> - - @@ -202,7 +202,7 @@ Link="Common\System\IO\FileSystem.Attributes.Windows.cs" /> - diff --git a/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj b/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj index 69fdb053de03d4..2110ae810ea63f 100644 --- a/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj +++ b/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj @@ -11,7 +11,7 @@ - diff --git a/src/libraries/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj b/src/libraries/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj index 6e662893f353c2..0d28f28e065c27 100644 --- a/src/libraries/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj +++ b/src/libraries/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj @@ -64,9 +64,9 @@ Link="Common\System\IO\DisableMediaInsertionPrompt.cs" /> - - diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj b/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj index 2ed89c0848a6db..c00e72c5513f4f 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj +++ b/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj @@ -10,7 +10,7 @@ - diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj b/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj index 13c8a3b19602ea..c864ab3ca6f5d3 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj +++ b/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj @@ -23,13 +23,13 @@ - - @@ -61,7 +61,7 @@ Link="Common\Interop\Unix\Interop.Errors.cs" /> - diff --git a/src/libraries/System.IO.FileSystem/tests/Net5CompatTests/System.IO.FileSystem.Net5Compat.Tests.csproj b/src/libraries/System.IO.FileSystem/tests/Net5CompatTests/System.IO.FileSystem.Net5Compat.Tests.csproj index a53bcdc584cd3d..27e1b1c431d678 100644 --- a/src/libraries/System.IO.FileSystem/tests/Net5CompatTests/System.IO.FileSystem.Net5Compat.Tests.csproj +++ b/src/libraries/System.IO.FileSystem/tests/Net5CompatTests/System.IO.FileSystem.Net5Compat.Tests.csproj @@ -31,8 +31,8 @@ - - + + @@ -45,7 +45,7 @@ - diff --git a/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj b/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj index 0a3cbab96e3232..95d6943c20ce74 100644 --- a/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj +++ b/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj @@ -93,8 +93,8 @@ - - + + @@ -211,7 +211,7 @@ - diff --git a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj index 13f737a53f47a6..1ab0b8cdd9161b 100644 --- a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj +++ b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj @@ -92,7 +92,7 @@ System.IO.Ports.SerialPort Link="Common\Interop\Windows\Interop.FileTypes.cs" /> - diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems index ca172d171a876b..d86d04c886c825 100644 --- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems +++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems @@ -433,7 +433,6 @@ - @@ -1213,7 +1212,10 @@ Common\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAttribute.cs - + + Common\System\IO\PathInternal.cs + + Common\System\IO\PathInternal.CaseSensitivity.cs @@ -1797,6 +1799,9 @@ Common\System\IO\FileSystem.DirectoryCreation.Windows.cs + + Common\System\IO\PathInternal.Windows.cs + @@ -1826,7 +1831,6 @@ - @@ -2085,6 +2089,9 @@ Common\System\Text\ValueUtf8Converter.cs + + Common\System\IO\PathInternal.Unix.cs + @@ -2113,7 +2120,6 @@ -