Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWEEP: Avoid unnecessary FileInfo/DirectoryInfo allocations, #832 #1060

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

paulirwin
Copy link
Contributor

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a change, please open an issue to discuss the change or find an existing issue.

Add string-based overloads to some methods that take FileInfo/DirectoryInfo to avoid unnecessary allocations

Fixes #832

Description

See #832 for context. This makes changes to add and prefer string-based overloads for methods that take FileInfo and DirectoryInfo primarily just for the FullName property, to avoid unnecessary allocations.

@paulirwin paulirwin added the notes:improvement An enhancement to an existing feature label Dec 5, 2024
@paulirwin paulirwin marked this pull request as ready for review December 6, 2024 03:58
@paulirwin paulirwin requested a review from NightOwl888 December 6, 2024 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes:improvement An enhancement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SWEEP: Add string overloads to eliminate unnecessary allocations of FileInfo and DirectoryInfo objects
1 participant