Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
we are no longer shipping MS.IO.Redist, there is no need for FileInfo…
… to be partial
  • Loading branch information
adamsitnik committed Nov 10, 2021
commit 2e4aed58a4560f08cde9aeea39c9fdd67e853612
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileAccess.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileAttributes.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileInfo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileInfo.netcoreapp.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileLoadException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\FileNotFoundException.cs" />
Expand Down
10 changes: 7 additions & 3 deletions src/libraries/System.Private.CoreLib/src/System/IO/FileInfo.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
// 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.IO;
using System.Text;
using System.Runtime.Versioning;

namespace System.IO
{
// Class for creating FileStream objects, and some basic file management
// routines such as Delete, etc.
public sealed partial class FileInfo : FileSystemInfo
public sealed class FileInfo : FileSystemInfo
{
private FileInfo() { }

Expand Down Expand Up @@ -72,6 +70,12 @@ public bool IsReadOnly
}
}

/// <summary>
/// Initializes a new instance of the <see cref="System.IO.FileStream" /> class with the specified creation mode, read/write and sharing permission, the access other FileStreams can have to the same file, the buffer size, additional file options and the allocation size.
/// </summary>
/// <remarks><see cref="System.IO.FileStream(string,System.IO.FileStreamOptions)"/> for information about exceptions.</remarks>
public FileStream Open(FileStreamOptions options) => File.Open(NormalizedPath, options);

public StreamReader OpenText()
=> new StreamReader(NormalizedPath, Encoding.UTF8, detectEncodingFromByteOrderMarks: true);

Expand Down

This file was deleted.