Skip to content

Commit 8e1b48e

Browse files
committed
Release 0.6.0. Added missing IMfsApi.ReadFileStreamAsync method.
1 parent ef7d5dc commit 8e1b48e

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/CoreApi/IMfsApi.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,23 @@ public interface IMfsApi
114114
/// </param>
115115
Task<string> ReadFileAsync(string path, long? offset = null, long? count = null, CancellationToken cancel = default);
116116

117+
/// <summary>
118+
/// Read a file as a stream from MFS.
119+
/// </summary>
120+
/// <param name="path">
121+
/// Path to file to be read. Required: yes
122+
/// </param>
123+
/// <param name="offset">
124+
/// Byte offset to begin reading from. Required: no
125+
/// </param>
126+
/// <param name="count">
127+
/// Maximum number of bytes to read. Required: no
128+
/// </param>
129+
/// <param name="cancel">
130+
/// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
131+
/// </param>
132+
Task<Stream> ReadFileStreamAsync(string path, long? offset = null, long? count = null, CancellationToken cancel = default);
133+
117134
/// <summary>
118135
/// Remove a file or directory or from MFS.
119136
/// </summary>

src/IpfsCore.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<LangVersion>12.0</LangVersion>
99

1010
<!-- https://semver.org/spec/v2.0.0.html -->
11-
<Version>0.5.0</Version>
11+
<Version>0.6.0</Version>
1212
<AssemblyVersion>$(Version)</AssemblyVersion>
1313

1414
<!-- Nuget specs -->
@@ -30,6 +30,10 @@
3030
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
3131
<GenerateDocumentationFile>true</GenerateDocumentationFile>
3232
<PackageReleaseNotes>
33+
--- 0.6.0 ---
34+
[Breaking]
35+
Added missing IMfsApi.ReadFileStreamAsync method.
36+
3337
--- 0.5.0 ---
3438
[Breaking]
3539
Added missing Name property to IFileSystemNode. This property was already present in the Ipfs.Http.FileSystemNode class, and is used in the MfsApi to get the name of the node. This is a breaking change, but it is unlikely that anyone has implemented this interface in their own code. If you have, you will need to add the Name property to your implementation.

0 commit comments

Comments
 (0)