Skip to content
This repository was archived by the owner on Jun 19, 2023. It is now read-only.

Commit c35356b

Browse files
authored
Merge pull request #21 from ipfs/feat/remove-wrap
remove Wrap
2 parents 0c1d048 + 33e0648 commit c35356b

File tree

4 files changed

+2
-51
lines changed

4 files changed

+2
-51
lines changed

.gx/lastpubver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.15: QmaLFN7mZFjJ1W9aQiPoY2WySnSqphmfZHQCPUtj2iqWVH
1+
0.1.16: QmaWreJcDyf2BEAtGDfL1ETGrGAHR8KS8UCCPWd3QtDg8R

options/unixfs.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ type UnixfsAddSettings struct {
3333
FsCache bool
3434
NoCopy bool
3535

36-
Wrap bool
37-
3836
Events chan<- interface{}
3937
Silent bool
4038
Progress bool
@@ -65,8 +63,6 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix,
6563
FsCache: false,
6664
NoCopy: false,
6765

68-
Wrap: false,
69-
7066
Events: nil,
7167
Silent: false,
7268
Progress: false,
@@ -234,15 +230,6 @@ func (unixfsOpts) HashOnly(hashOnly bool) UnixfsAddOption {
234230
}
235231
}
236232

237-
// Wrap tells the adder to wrap the added file structure with an additional
238-
// directory.
239-
func (unixfsOpts) Wrap(wrap bool) UnixfsAddOption {
240-
return func(settings *UnixfsAddSettings) error {
241-
settings.Wrap = wrap
242-
return nil
243-
}
244-
}
245-
246233
// Events specifies channel which will be used to report events about ongoing
247234
// Add operation.
248235
//

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@
9191
"license": "",
9292
"name": "interface-go-ipfs-core",
9393
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
94-
"version": "0.1.15"
94+
"version": "0.1.16"
9595
}
9696

tests/unixfs.go

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,6 @@ func (tp *provider) TestAdd(t *testing.T) {
248248
data: flatDir,
249249
path: "/ipfs/QmRKGpFfR32FVXdvJiHfo4WJ5TDYBsM1P9raAp1p6APWSp",
250250
},
251-
{
252-
name: "simpleDirWrap",
253-
data: flatDir,
254-
expect: wrapped("QmRKGpFfR32FVXdvJiHfo4WJ5TDYBsM1P9raAp1p6APWSp"),
255-
path: "/ipfs/QmXxCaQkC8Z6Qws1nTkTQfCsL9y4XvWXnrPokp9bhmjC1L",
256-
opts: []options.UnixfsAddOption{options.Unixfs.Wrap(true)},
257-
},
258251
{
259252
name: "simpleDir",
260253
data: flatDir,
@@ -279,35 +272,6 @@ func (tp *provider) TestAdd(t *testing.T) {
279272
wrap: "foo",
280273
expect: wrapped("foo"),
281274
},
282-
{
283-
name: "stdinWrapped",
284-
path: "/ipfs/QmU3r81oZycjHS9oaSHw37ootMFuFUw1DvMLKXPsezdtqU",
285-
data: func() files.Node {
286-
return files.NewBytesFile([]byte(helloStr))
287-
},
288-
expect: func(files.Node) files.Node {
289-
return files.NewMapDirectory(map[string]files.Node{
290-
"QmQy2Dw4Wk7rdJKjThjYXzfFJNaRKRHhHP5gHHXroJMYxk": files.NewBytesFile([]byte(helloStr)),
291-
})
292-
},
293-
opts: []options.UnixfsAddOption{options.Unixfs.Wrap(true)},
294-
},
295-
{
296-
name: "twoLevelDirWrapped",
297-
data: twoLevelDir(),
298-
wrap: "t",
299-
expect: wrapped("QmPwsL3T5sWhDmmAWZHAzyjKtMVDS9a11aHNRqb3xoVnmg", "t"),
300-
path: "/ipfs/QmXzZwAh34pmNjuKsVGZfpbByis5S5qeZjCCUxa1ajZqzH",
301-
opts: []options.UnixfsAddOption{options.Unixfs.Wrap(true)},
302-
},
303-
{
304-
name: "twoLevelInlineHash",
305-
data: twoLevelDir(),
306-
wrap: "t",
307-
expect: wrapped("zBunoruKoyCHKkALNSWxDvj4L7yuQnMgQ4hUa9j1Z64tVcDEcu6Zdetyu7eeFCxMPfxb7YJvHeFHoFoHMkBUQf6vfdhmi", "t"),
308-
path: "/ipfs/QmUX6GykDGHTMtLmDkfjqs48QwQK82vou51xwaY9TSU7Zo",
309-
opts: []options.UnixfsAddOption{options.Unixfs.Wrap(true), options.Unixfs.Inline(true), options.Unixfs.RawLeaves(true), options.Unixfs.Hash(mh.SHA3)},
310-
},
311275
// hidden
312276
{
313277
name: "hiddenFilesAdded",

0 commit comments

Comments
 (0)