-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
System.IO files cleanup #61413
System.IO files cleanup #61413
Conversation
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsFor the description please refer to commit messages.
|
public static SafeFileHandle OpenHandle(string path, FileMode mode = FileMode.Open, FileAccess access = FileAccess.Read, | ||
FileShare share = FileShare.Read, FileOptions options = FileOptions.None, long preallocationSize = 0) | ||
{ | ||
Strategies.FileStreamHelpers.ValidateArguments(path, mode, access, share, bufferSize: 0, options, preallocationSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: should FileStreamHelpers be moved out of Strategies?
@@ -731,5 +774,176 @@ private static void Validate(string path, Encoding encoding) | |||
if (path.Length == 0) | |||
throw new ArgumentException(SR.Argument_EmptyPath, nameof(path)); | |||
} | |||
|
|||
private static byte[] ReadAllBytesUnknownLength(FileStream fs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did anything change in these methods, or you just moved them between files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just moved them and I plan to send a separate PR to change them from using FileStream
to RandomAccess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool
Probably improved dotnet/perf-autofiling-issues#2375 (windows-x64) |
For the description please refer to commit messages.