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

Vault edition: Use Streams instead of Buffers #38

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

SakuraIsayeki
Copy link
Member

Changed the IWritableVault interface to mandate streams. Buffer implementations are moved to an extension class.

This commit adds support for writing files and notes to the vault using streamed content. The `IWritableVault` interface now includes two new methods: `WriteFileAsync(string path, Stream content)` and `WriteNoteAsync(string path, Stream content)`. These methods allow creating or overwriting files and notes with the specified path, while also accepting a stream of content.

In the implementation of the `FileSystemVault` class, these methods have been implemented to write the streamed content to the file system. The existing method signatures that accept byte arrays have been updated to internally use streams for consistency.

Additionally, some code cleanup has been done by removing unused namespaces and renaming a utility class.
@SakuraIsayeki SakuraIsayeki self-assigned this Apr 6, 2024
@SakuraIsayeki SakuraIsayeki merged commit f0b8fc6 into develop Apr 6, 2024
5 checks passed
@SakuraIsayeki SakuraIsayeki deleted the feature/vault-edition branch May 12, 2024 00:41
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