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

Be explicit about FileShare mode when using FileStream. #240

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Aug 6, 2024

Context https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2055618

We know that by default FileShare will be Read when using a FileStream. However lets be totally clear on what we want from this point on, so if there is a problem we know its not us.

We know that by default `FileShare` will be `Read`
when using a `FileStream`. However lets be totally
clear on what we want from this point on, so if there
is a problem we know its not us.
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

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

Sometimes I use File.OpenRead() instead of FileStream ctor, but I think either of these is fine.

@dellis1972 dellis1972 merged commit 7ec795c into dotnet:main Aug 6, 2024
4 checks passed
@dellis1972 dellis1972 deleted the fileshare branch August 6, 2024 13:24
jonpryor pushed a commit to dotnet/java-interop that referenced this pull request Aug 9, 2024
Changes: dotnet/android-tools@3debf8e...7ec795c

  * dotnet/android-tools@7ec795c: Be explicit about FileShare mode when using FileStream. (dotnet/android-tools#240)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
jonpryor pushed a commit to dotnet/android that referenced this pull request Aug 14, 2024
Changes: dotnet/android-tools@3debf8e...7ec795c

  * dotnet/android-tools@7ec795c: Be explicit about FileShare mode when using FileStream. (dotnet/android-tools#240)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

2 participants