Skip to content

Commit 44f050a

Browse files
authored
Fold System.IO.FileSystem into CoreLib (#53231)
* move Queue<T> to System.Private.CoreLib * fold System.IO.FileSystem into System.Private.CoreLib
1 parent 6e5f722 commit 44f050a

File tree

57 files changed

+553
-1068
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+553
-1068
lines changed

src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ internal static extern unsafe int NtQueryInformationFile(
1717
uint Length,
1818
uint FileInformationClass);
1919

20-
[StructLayout(LayoutKind.Sequential)]
21-
internal struct IO_STATUS_BLOCK
22-
{
23-
private uint Status;
24-
private IntPtr Information;
25-
}
26-
2720
internal const uint FileModeInformation = 16;
2821

2922
internal const int STATUS_INVALID_HANDLE = unchecked((int)0xC0000008);

src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,53 +8,51 @@
88
<IncludePlatformAttributes>true</IncludePlatformAttributes>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Directory.cs"
11+
<Compile Include="$(CoreLibSharedDir)System\IO\Directory.cs"
1212
Link="Microsoft\IO\Directory.cs" />
13-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\DirectoryInfo.cs"
13+
<Compile Include="$(CoreLibSharedDir)System\IO\DirectoryInfo.cs"
1414
Link="Microsoft\IO\DirectoryInfo.cs" />
15-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Enumeration\FileSystemEntry.cs"
15+
<Compile Include="$(CoreLibSharedDir)System\IO\Enumeration\FileSystemEntry.cs"
1616
Link="Microsoft\IO\Enumeration\FileSystemEntry.cs" />
17-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Enumeration\FileSystemEntry.Windows.cs"
17+
<Compile Include="$(CoreLibSharedDir)System\IO\Enumeration\FileSystemEntry.Windows.cs"
1818
Link="Microsoft\IO\Enumeration\FileSystemEntry.Windows.cs" />
19-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Enumeration\FileSystemEnumerable.cs"
19+
<Compile Include="$(CoreLibSharedDir)System\IO\Enumeration\FileSystemEnumerable.cs"
2020
Link="Microsoft\IO\Enumeration\FileSystemEnumerable.cs" />
21-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Enumeration\FileSystemEnumerableFactory.cs"
21+
<Compile Include="$(CoreLibSharedDir)System\IO\Enumeration\FileSystemEnumerableFactory.cs"
2222
Link="Microsoft\IO\Enumeration\FileSystemEnumerableFactory.cs" />
23-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Enumeration\FileSystemEnumerator.cs"
23+
<Compile Include="$(CoreLibSharedDir)System\IO\Enumeration\FileSystemEnumerator.cs"
2424
Link="Microsoft\IO\Enumeration\FileSystemEnumerator.cs" />
25-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Enumeration\FileSystemEnumerator.Win32.cs"
25+
<Compile Include="$(CoreLibSharedDir)System\IO\Enumeration\FileSystemEnumerator.Win32.cs"
2626
Link="Microsoft\IO\Enumeration\FileSystemEnumerator.Win32.cs" />
27-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Enumeration\FileSystemEnumerator.Windows.cs"
27+
<Compile Include="$(CoreLibSharedDir)System\IO\Enumeration\FileSystemEnumerator.Windows.cs"
2828
Link="Microsoft\IO\Enumeration\FileSystemEnumerator.Windows.cs" />
29-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Enumeration\FileSystemName.cs"
29+
<Compile Include="$(CoreLibSharedDir)System\IO\Enumeration\FileSystemName.cs"
3030
Link="Microsoft\IO\Enumeration\FileSystemName.cs" />
31-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\EnumerationOptions.cs"
31+
<Compile Include="$(CoreLibSharedDir)System\IO\EnumerationOptions.cs"
3232
Link="Microsoft\IO\EnumerationOptions.cs" />
33-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Error.cs"
34-
Link="Microsoft\IO\Error.cs" />
35-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\File.cs"
33+
<Compile Include="$(CoreLibSharedDir)System\IO\File.cs"
3634
Link="Microsoft\IO\File.cs" />
37-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\FileInfo.cs"
35+
<Compile Include="$(CoreLibSharedDir)System\IO\FileInfo.cs"
3836
Link="Microsoft\IO\FileInfo.cs" />
39-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\FileSystem.Win32.cs"
37+
<Compile Include="$(CoreLibSharedDir)System\IO\FileSystem.Win32.cs"
4038
Link="Microsoft\IO\FileSystem.Win32.cs" />
41-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\FileSystem.Windows.cs"
39+
<Compile Include="$(CoreLibSharedDir)System\IO\FileSystem.Windows.cs"
4240
Link="Microsoft\IO\FileSystem.Windows.cs" />
43-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\FileSystemInfo.cs"
41+
<Compile Include="$(CoreLibSharedDir)System\IO\FileSystemInfo.cs"
4442
Link="Microsoft\IO\FileSystemInfo.cs" />
45-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\FileSystemInfo.Windows.cs"
43+
<Compile Include="$(CoreLibSharedDir)System\IO\FileSystemInfo.Windows.cs"
4644
Link="Microsoft\IO\FileSystemInfo.Windows.cs" />
47-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Iterator.cs"
45+
<Compile Include="$(CoreLibSharedDir)System\IO\Iterator.cs"
4846
Link="Microsoft\IO\Iterator.cs" />
49-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\MatchCasing.cs"
47+
<Compile Include="$(CoreLibSharedDir)System\IO\MatchCasing.cs"
5048
Link="Microsoft\IO\MatchCasing.cs" />
51-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\MatchType.cs"
49+
<Compile Include="$(CoreLibSharedDir)System\IO\MatchType.cs"
5250
Link="Microsoft\IO\MatchType.cs" />
53-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\ReadLinesIterator.cs"
51+
<Compile Include="$(CoreLibSharedDir)System\IO\ReadLinesIterator.cs"
5452
Link="Microsoft\IO\ReadLinesIterator.cs" />
55-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\SearchOption.cs"
53+
<Compile Include="$(CoreLibSharedDir)System\IO\SearchOption.cs"
5654
Link="Microsoft\IO\SearchOption.cs" />
57-
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\SearchTarget.cs"
55+
<Compile Include="$(CoreLibSharedDir)System\IO\SearchTarget.cs"
5856
Link="Microsoft\IO\SearchTarget.cs" />
5957
<Compile Include="$(CommonPath)Interop\Windows\BCrypt\Interop.BCryptGenRandom.cs"
6058
Link="Interop\Windows\BCrypt\Interop.BCryptGenRandom.cs" />
@@ -195,6 +193,7 @@
195193
<Compile Include="$(CoreLibSharedDir)System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs"
196194
Link="System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs" />
197195
<Compile Include="Microsoft\IO\StringExtensions.cs" />
196+
<Compile Include="Microsoft\IO\ThrowHelper.cs" />
198197
</ItemGroup>
199198
<ItemGroup>
200199
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
5+
using System.IO;
6+
7+
namespace Microsoft.IO
8+
{
9+
internal static class ThrowHelper
10+
{
11+
internal static void ThrowEndOfFileException()
12+
{
13+
throw new EndOfStreamException(SR.IO_EOF_ReadBeyondEOF);
14+
}
15+
}
16+
}

src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
</ItemGroup>
99
<ItemGroup>
1010
<ProjectReference Include="..\..\System.ComponentModel\ref\System.ComponentModel.csproj" />
11-
<ProjectReference Include="..\..\System.IO.FileSystem\ref\System.IO.FileSystem.csproj" />
1211
<ProjectReference Include="..\..\System.IO.FileSystem.DriveInfo\ref\System.IO.FileSystem.DriveInfo.csproj" />
1312
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
1413
<ProjectReference Include="..\..\System.Runtime.Extensions\ref\System.Runtime.Extensions.csproj" />

src/libraries/System.Collections/src/System.Collections.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
<Compile Include="System\Collections\Generic\LinkedList.cs" />
1616
<Compile Include="System\Collections\Generic\PriorityQueue.cs" />
1717
<Compile Include="System\Collections\Generic\PriorityQueueDebugView.cs" />
18-
<Compile Include="System\Collections\Generic\Queue.cs" />
19-
<Compile Include="System\Collections\Generic\QueueDebugView.cs" />
2018
<Compile Include="System\Collections\Generic\SortedDictionary.cs" />
2119
<Compile Include="System\Collections\Generic\SortedList.cs" />
2220
<Compile Include="System\Collections\Generic\SortedSet.cs" />

src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@
88
</ItemGroup>
99
<ItemGroup>
1010
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
11-
<ProjectReference Include="..\..\System.IO.FileSystem.Primitives\ref\System.IO.FileSystem.Primitives.csproj" />
12-
<ProjectReference Include="..\..\System.IO.FileSystem\ref\System.IO.FileSystem.csproj" />
1311
</ItemGroup>
1412
</Project>

src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
</ItemGroup>
7878
<ItemGroup Condition=" '$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
7979
<Compile Include="System\IO\FileSystemWatcher.OSX.cs" />
80-
<Compile Include="$(LibrariesProjectRoot)System.IO.FileSystem\src\System\IO\FileSystem.Exists.Unix.cs"
81-
Link="System.IO.FileSystem\src\System\IO\FileSystem.Exists.Unix.cs" />
80+
<Compile Include="$(CoreLibSharedDir)System\IO\FileSystem.Exists.Unix.cs"
81+
Link="System\IO\FileSystem.Exists.Unix.cs" />
8282
<Compile Include="$(CommonPath)Interop\OSX\Interop.EventStream.cs"
8383
Link="Common\Interop\OSX\Interop.EventStream.cs" />
8484
<Compile Include="$(CommonPath)Interop\OSX\Interop.CoreFoundation.cs"

src/libraries/System.IO.FileSystem/ref/System.IO.FileSystem.Forwards.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,17 @@
77
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeFileHandle))]
88
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileOptions))]
99
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileStream))]
10+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Directory))]
11+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.DirectoryInfo))]
12+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.EnumerationOptions))]
13+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.File))]
14+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileInfo))]
15+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileSystemInfo))]
16+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.MatchCasing))]
17+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.MatchType))]
18+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.SearchOption))]
19+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Enumeration.FileSystemEntry))]
20+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Enumeration.FileSystemEnumerable<>))]
21+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Enumeration.FileSystemEnumerator<>))]
22+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Enumeration.FileSystemName))]
23+

0 commit comments

Comments
 (0)