File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,21 @@ public interface IObjectApi
66
66
/// </returns>
67
67
Task < DagNode > GetAsync ( Cid id , CancellationToken cancel = default ( CancellationToken ) ) ;
68
68
69
+ /// <summary>
70
+ /// Information on a MerkleDag node.
71
+ /// </summary>
72
+ /// <param name="id">
73
+ /// The <see cref="Cid"/> of the node.
74
+ /// </param>
75
+ /// <param name="cancel">
76
+ /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
77
+ /// </param>
78
+ /// <returns>
79
+ /// A task that represents the asynchronous operation. The task's value
80
+ /// contains the <see cref="ObjectStat"/>.
81
+ /// </returns>
82
+ Task < ObjectStat > StatAsync ( Cid id , CancellationToken cancel = default ( CancellationToken ) ) ;
83
+
69
84
/// <summary>
70
85
/// Store a MerkleDAG node.
71
86
/// </summary>
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Text ;
4
+
5
+ namespace Ipfs . CoreApi
6
+ {
7
+ /// <summary>
8
+ /// Information on a DAG node.
9
+ /// </summary>
10
+ /// <seealso cref="IObjectApi"/>
11
+ public class ObjectStat
12
+ {
13
+ /// <summary>
14
+ /// Number of links.
15
+ /// </summary>
16
+ public int LinkCount { get ; set ; }
17
+
18
+ /// <summary>
19
+ /// Size of the links segment.
20
+ /// </summary>
21
+ public long LinkSize { get ; set ; }
22
+
23
+ /// <summary>
24
+ /// Size of the raw, encoded data.
25
+ /// </summary>
26
+ public long BlockSize { get ; set ; }
27
+
28
+ /// <summary>
29
+ /// Siz of the data segment.
30
+ /// </summary>
31
+ public long DataSize { get ; set ; }
32
+
33
+ /// <summary>
34
+ /// Size of object and its references
35
+ /// </summary>
36
+ public long CumulativeSize { get ; set ; }
37
+ }
38
+ }
You can’t perform that action at this time.
0 commit comments