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

✨ Implement constructor to create BinaryFormat from a file #205

Merged
merged 1 commit into from Nov 28, 2023

Conversation

pleonex
Copy link
Member

@pleonex pleonex commented Nov 28, 2023

As it's a common operation, add a constructor to create a new instance of BinaryFormat from a file path. To create from a part of a file, use DataStreamFactory, we don't want to port the full API in the constructor.

This PR closes #195

Quality check list

  • Related code has been tested automatically or manually
  • Related documentation is updated
  • I acknowledge I have read and filled this checklist and accept the
    developer certificate of origin

Acceptance criteria

  • Shortcut to create BinaryFormat from a file path.

Follow-up work

None

Example

using var binary = new BinaryFormat("file1.bin", FileOpenMode.Read);

@pleonex pleonex self-assigned this Nov 28, 2023
@pleonex pleonex merged commit dc2ee45 into develop Nov 28, 2023
5 checks passed
@pleonex pleonex deleted the feature/195-binary-file branch November 28, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance opening and importing files from disk
1 participant