Skip to content

Commit

Permalink
fileStream.Flush();
Browse files Browse the repository at this point in the history
  • Loading branch information
Viir committed Aug 10, 2023
1 parent d8532be commit 155d757
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions implement/elm-time/Pine/FileStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ public void SetFileContent(IImmutableList<string> path, ReadOnlyMemory<byte> fil
using var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write);

fileStream.Write(fileContent.Span);

fileStream.Flush();
}

public void AppendFileContent(IImmutableList<string> path, ReadOnlyMemory<byte> fileContent)
Expand All @@ -115,6 +117,8 @@ public void AppendFileContent(IImmutableList<string> path, ReadOnlyMemory<byte>
using var fileStream = new FileStream(filePath, FileMode.Append, FileAccess.Write);

fileStream.Write(fileContent.Span);

fileStream.Flush();
}

public ReadOnlyMemory<byte>? GetFileContent(IImmutableList<string> path)
Expand Down

0 comments on commit 155d757

Please sign in to comment.