@@ -43,7 +43,7 @@ func (api *ObjectAPI) New(ctx context.Context, opts ...caopts.ObjectNewOption) (
43
43
func (api * ObjectAPI ) Put (ctx context.Context , r io.Reader , opts ... caopts.ObjectPutOption ) (path.ImmutablePath , error ) {
44
44
options , err := caopts .ObjectPutOptions (opts ... )
45
45
if err != nil {
46
- return nil , err
46
+ return path. ImmutablePath {} , err
47
47
}
48
48
49
49
var out objectOut
@@ -54,12 +54,12 @@ func (api *ObjectAPI) Put(ctx context.Context, r io.Reader, opts ...caopts.Objec
54
54
FileBody (r ).
55
55
Exec (ctx , & out )
56
56
if err != nil {
57
- return nil , err
57
+ return path. ImmutablePath {} , err
58
58
}
59
59
60
60
c , err := cid .Parse (out .Hash )
61
61
if err != nil {
62
- return nil , err
62
+ return path. ImmutablePath {} , err
63
63
}
64
64
65
65
return path .FromCid (c ), nil
@@ -156,20 +156,20 @@ func (api *ObjectAPI) Stat(ctx context.Context, p path.Path) (*iface.ObjectStat,
156
156
func (api * ObjectAPI ) AddLink (ctx context.Context , base path.Path , name string , child path.Path , opts ... caopts.ObjectAddLinkOption ) (path.ImmutablePath , error ) {
157
157
options , err := caopts .ObjectAddLinkOptions (opts ... )
158
158
if err != nil {
159
- return nil , err
159
+ return path. ImmutablePath {} , err
160
160
}
161
161
162
162
var out objectOut
163
163
err = api .core ().Request ("object/patch/add-link" , base .String (), name , child .String ()).
164
164
Option ("create" , options .Create ).
165
165
Exec (ctx , & out )
166
166
if err != nil {
167
- return nil , err
167
+ return path. ImmutablePath {} , err
168
168
}
169
169
170
170
c , err := cid .Parse (out .Hash )
171
171
if err != nil {
172
- return nil , err
172
+ return path. ImmutablePath {} , err
173
173
}
174
174
175
175
return path .FromCid (c ), nil
@@ -180,12 +180,12 @@ func (api *ObjectAPI) RmLink(ctx context.Context, base path.Path, link string) (
180
180
err := api .core ().Request ("object/patch/rm-link" , base .String (), link ).
181
181
Exec (ctx , & out )
182
182
if err != nil {
183
- return nil , err
183
+ return path. ImmutablePath {} , err
184
184
}
185
185
186
186
c , err := cid .Parse (out .Hash )
187
187
if err != nil {
188
- return nil , err
188
+ return path. ImmutablePath {} , err
189
189
}
190
190
191
191
return path .FromCid (c ), nil
@@ -197,12 +197,12 @@ func (api *ObjectAPI) AppendData(ctx context.Context, p path.Path, r io.Reader)
197
197
FileBody (r ).
198
198
Exec (ctx , & out )
199
199
if err != nil {
200
- return nil , err
200
+ return path. ImmutablePath {} , err
201
201
}
202
202
203
203
c , err := cid .Parse (out .Hash )
204
204
if err != nil {
205
- return nil , err
205
+ return path. ImmutablePath {} , err
206
206
}
207
207
208
208
return path .FromCid (c ), nil
@@ -214,12 +214,12 @@ func (api *ObjectAPI) SetData(ctx context.Context, p path.Path, r io.Reader) (pa
214
214
FileBody (r ).
215
215
Exec (ctx , & out )
216
216
if err != nil {
217
- return nil , err
217
+ return path. ImmutablePath {} , err
218
218
}
219
219
220
220
c , err := cid .Parse (out .Hash )
221
221
if err != nil {
222
- return nil , err
222
+ return path. ImmutablePath {} , err
223
223
}
224
224
225
225
return path .FromCid (c ), nil
0 commit comments