Conversation
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/acfdc10e-aec5-4327-80c3-184dbe411c55 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/acfdc10e-aec5-4327-80c3-184dbe411c55 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/17b40284-551a-41ea-a762-cac63e16405c Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/509167ff-4a8d-42e8-8185-a209edb609b5 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
|
@copilot we should also preserve Unix file modes. Update PolyShim to 2.10.0 in order to gain access to a portable implementation of File.Get/SetUnixMode(). |
…tory.Copy Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/67959c43-13cc-41de-973e-d36d89b21152 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Done in f091558. Updated PolyShim to 2.10.0 and added Unix file mode preservation in the copy loop via |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## prime #38 +/- ##
==========================================
+ Coverage 94.08% 94.47% +0.39%
==========================================
Files 76 76
Lines 1470 1574 +104
Branches 125 131 +6
==========================================
+ Hits 1383 1487 +104
Misses 65 65
Partials 22 22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…irectly Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/13bac450-a0ad-477d-acfd-68c8e938ac76 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
|
@copilot run dotnet build to reformat everything |
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/5f9d244c-68f0-4685-9b53-e019043369b1 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
… relative paths Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/95a61ec6-6453-478b-851c-9c8342d0264e Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ports
Directory.Copyfrom Onova'sDirectoryExinto PowerKit'sDirectoryExtensions.Changes
Directory.Packages.props— updates PolyShim to2.10.0to gain portableFile.GetUnixFileMode/File.SetUnixFileModepolyfills fornet35andnetstandard2.0DirectoryExtensions.cs— addsDirectory.Copy(sourcePath, destinationPath, overwrite = true):File.GetUnixFileMode/File.SetUnixFileModenetstandard2.0/net35/net10.0targets: replacesPath.GetRelativePath(NS2.1+) with aSubstringapproach; usesDisposable.Merge([.. sourceStreams, .. destinationStreams]).Dispose()in afinallyblock for safe stream disposal; usesFile.OpenRead/File.OpenWrite/File.Open(FileMode.CreateNew)and aforeach/ZiploopDirectoryExtensionsTests.cs— 6 new tests covering flat copy, nested subdirectory copy, overwrite, no-overwrite (IOException), destination truncation, and Unix file mode preservation (skipped on Windows)