Skip to content

Conversation

@Tyrrrz
Copy link
Owner

@Tyrrrz Tyrrrz commented Nov 16, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 16, 2025 16:51
@Tyrrrz Tyrrrz added the enhancement New feature or request label Nov 16, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds polyfills for Path.EndsInDirectorySeparator and Path.TrimEndingDirectorySeparator methods from .NET Core 3.0, making them available for earlier framework versions. Additionally, it includes refactoring improvements to existing code.

  • Implements Path.EndsInDirectorySeparator to check if a path ends with a directory separator
  • Implements Path.TrimEndingDirectorySeparator to remove trailing directory separators from paths
  • Refactors Stream.ReadAtLeast and Stream.ReadAtLeastAsync to use the range operator instead of Slice method

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
PolyShim/NetCore30/Path.cs Adds polyfill implementations for EndsInDirectorySeparator and TrimEndingDirectorySeparator with conditional compilation for different .NET Standard versions
PolyShim/NetCore10/RuntimeInformation.cs Moves preprocessor directive to only wrap the IsOSPlatform method, allowing the class to be defined even when platform detection is unavailable
PolyShim/Net70/Stream.cs Refactors buffer slicing to use idiomatic range operator syntax ([totalBytesRead..]) instead of .Slice() method
PolyShim.Tests/NetCore30/PathTests.cs Adds comprehensive test coverage for the new Path polyfill methods including various path formats and edge cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tyrrrz Tyrrrz merged commit c3d1446 into master Nov 16, 2025
5 checks passed
@Tyrrrz Tyrrrz deleted the path-ends-with branch November 16, 2025 17:07
@codecov
Copy link

codecov bot commented Nov 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (ac078d6) to head (dbd293a).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@     Coverage Diff      @@
##   master   #39   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants