File tree Expand file tree Collapse file tree 3 files changed +110
-0
lines changed Expand file tree Collapse file tree 3 files changed +110
-0
lines changed Original file line number Diff line number Diff line change @@ -96,5 +96,15 @@ public class AddFileOptions
96
96
/// Used to report the progress of a file transfer.
97
97
/// </summary>
98
98
public IProgress < TransferProgress > ? Progress { get ; set ; }
99
+
100
+ /// <summary>
101
+ /// Add the file using filestore. Implies raw-leaves.
102
+ /// </summary>
103
+ public bool ? NoCopy { get ; set ; }
104
+
105
+ /// <summary>
106
+ /// Check the filestore for pre-existing blocks.
107
+ /// </summary>
108
+ public bool ? FsCache { get ; set ; }
99
109
}
100
110
}
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Text ;
4
+ using System . Threading ;
5
+ using System . Threading . Tasks ;
6
+
7
+ namespace Ipfs . CoreApi
8
+ {
9
+ /// <summary>
10
+ /// Abstraction for the file store api.
11
+ /// </summary>
12
+ public interface IFilestoreApi
13
+ {
14
+ /// <summary>
15
+ /// Lists blocks that are both in the filestore and standard block storage.
16
+ /// </summary>
17
+ public Task < IDupsResponse > DupsAsync ( CancellationToken token ) ;
18
+
19
+ /// <summary>
20
+ /// Lists filestore objects
21
+ /// </summary>
22
+ /// <param name="cid">Cid of objects to verify. Required: no.</param>
23
+ /// <param name="token">The cancellation token.</param>
24
+ /// <param name="fileOrder">Verify the objects based on the order of the backing file. Required: no.</param>
25
+ /// <returns></returns>
26
+ public Task < IFilestoreApiObjectResponse > ListAsync ( string cid , bool fileOrder , CancellationToken token ) ;
27
+
28
+ /// <summary>
29
+ ///
30
+ /// </summary>
31
+ /// <param name="cid">Cid of objects to list. Required: no.</param>
32
+ /// <param name="token">The cancellation token.</param>
33
+ /// <param name="fileOrder">Lists the objects based on the order of the backing file. Required: no.</param>
34
+ /// <returns></returns>
35
+ public Task < IFilestoreApiObjectResponse > VerifyObjectsAsync ( string cid , bool fileOrder , CancellationToken token ) ;
36
+ }
37
+ }
Original file line number Diff line number Diff line change
1
+ using Newtonsoft . Json ;
2
+
3
+ namespace Ipfs . CoreApi
4
+ {
5
+ /// <summary>
6
+ /// Interface for <see cref="IFilestoreApi"/> repsonse.
7
+ /// </summary>
8
+ public interface IFilestoreApiObjectResponse
9
+ {
10
+ /// <summary>
11
+ /// Holds any error message.
12
+ /// </summary>
13
+ public string ErrorMsg { get ; set ; }
14
+
15
+ /// <summary>
16
+ /// Path to the file
17
+ /// </summary>
18
+ public string FilePath { get ; set ; }
19
+
20
+ /// <summary>
21
+ /// The response offset.
22
+ /// </summary>
23
+ public string Offset { get ; set ; }
24
+
25
+ /// <summary>
26
+ /// The size of the object.
27
+ /// </summary>
28
+ public string Size { get ; set ; }
29
+
30
+ /// <summary>
31
+ /// The object status.
32
+ /// </summary>
33
+ public string Status { get ; set ; }
34
+ }
35
+
36
+ /// <summary>
37
+ /// Model for the hold filestore key
38
+ /// </summary>
39
+ public interface IFilestoreKey
40
+ {
41
+ /// <summary>
42
+ /// Key value.
43
+ /// </summary>
44
+ [ JsonProperty ( "/" ) ]
45
+ public string _ { get ; set ; }
46
+ }
47
+
48
+ /// <summary>
49
+ /// Interface for <see cref="IDupsResponse"/> response.
50
+ /// </summary>
51
+ public interface IDupsResponse
52
+ {
53
+ /// <summary>
54
+ /// Any error in the <see cref="IFilestoreApi"/> Dups response.
55
+ /// </summary>
56
+ public string Err { get ; set ; }
57
+
58
+ /// <summary>
59
+ /// The error in the <see cref="IFilestoreApi"/> Dups response.
60
+ /// </summary>
61
+ public string Ref { get ; set ; }
62
+ }
63
+ }
You can’t perform that action at this time.
0 commit comments