Merged
Conversation
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/14aee23b-4686-454b-aaea-0eeb629efc3e Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Tyrrrz
April 14, 2026 16:23
View session
Tyrrrz
reviewed
Apr 14, 2026
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/eb27b321-61e0-4dc1-b779-5cbef5999ac1 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Owner
|
@copilot resolve the merge conflicts in this pull request |
…y-reset-extension # Conflicts: # PowerKit.Tests/DirectoryExtensionsTests.cs # PowerKit/Extensions/DirectoryExtensions.cs Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Contributor
Author
Tyrrrz
approved these changes
Apr 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Directory.Reset(string path) extension to PowerKit’s DirectoryExtensions, providing a simple way to delete a directory (recursively) and recreate it as an empty directory—while gracefully handling the “directory doesn’t exist” case.
Changes:
- Implemented
Directory.Reset(string path)inPowerKit.Extensions. - Added tests covering reset of an existing directory with contents and a non-existent directory path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| PowerKit/Extensions/DirectoryExtensions.cs | Adds Directory.Reset(...) which deletes recursively (ignoring DirectoryNotFoundException) and recreates the directory. |
| PowerKit.Tests/DirectoryExtensionsTests.cs | Adds coverage for Reset behavior on existing and non-existent directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
Directory.Resetextension method onDirectorythat deletes the directory recursively and recreates it as an empty directory.DirectoryExtensions.cs: ImplementsDirectory.Reset(string path)— no-ops gracefully if the directory doesn't exist (just creates it)DirectoryExtensionsTests.cs: Tests for existing directory with contents and non-existent path