Skip to content

FileVsFileInfoInCSharp: .NET 10, leaked stream fix and new samples - #2367

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/80893-csharp-file-vs-fileinfo
Open

vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/80893-csharp-file-vs-fileinfo

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves the File vs FileInfo sample to net10.0 with current xUnit packages, disposes the FileStream returned by FileInfo.Create() in OpenReadFile() so OpenRead() no longer fails when the test runs alone, clears the nullable warnings, and replaces the cache, multi-file and single-file samples with versions that run on any OS: a FileInfo that goes stale when the file is created elsewhere, File.OpenWrite() leaving the old tail in place, and MoveTo() updating the instance, each with a new test.

…add cache, OpenWrite and MoveTo samples with tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant